forked from colonelpanic/dotfiles
[NixOS] Move package customizations to overlay
This commit is contained in:
parent
44718aeb57
commit
731b61918c
@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, options, ... }:
|
||||||
let
|
let
|
||||||
gitter = with pkgs; callPackage ./gitter.nix { };
|
my-overlays = import ./overlays.nix;
|
||||||
my-python-packages = python-packages: with python-packages; [
|
my-python-packages = python-packages: with python-packages; [
|
||||||
appdirs
|
appdirs
|
||||||
requests
|
requests
|
||||||
@ -11,81 +11,16 @@ let
|
|||||||
pip
|
pip
|
||||||
];
|
];
|
||||||
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
|
python-with-my-packages = pkgs.python3.withPackages my-python-packages;
|
||||||
udiskie-appindicator = pkgs.udiskie.overrideAttrs (oldAttrs: rec {
|
|
||||||
version = "1.7.5";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "coldfix";
|
|
||||||
repo = "udiskie";
|
|
||||||
rev = version;
|
|
||||||
sha256 = "1mcdn8ha5d5nsmrzk6xnnsqrmk94rdrzym9sqm38zk5r8gpyl1k4";
|
|
||||||
};
|
|
||||||
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [pkgs.libappindicator-gtk3];
|
|
||||||
});
|
|
||||||
clipit-master = pkgs.clipit.overrideAttrs (oldAttrs: rec {
|
|
||||||
version = "50d983514386029a1f133187902084b753458f32";
|
|
||||||
preConfigure = "./autogen.sh";
|
|
||||||
configureFlags = ["--with-gtk3" "--enable-appindicator"];
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "IvanMalison";
|
|
||||||
repo = "ClipIt";
|
|
||||||
sha256 = "1d52zjnxmcp2kr4wvq2yn9fhr61v9scp91fxfvasvz5m7k1zagdn";
|
|
||||||
rev = version;
|
|
||||||
};
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
autoconf automake intltool gtk3 xdotool hicolor-icon-theme
|
|
||||||
libappindicator-gtk3
|
|
||||||
];
|
|
||||||
});
|
|
||||||
pasystray-appindicator = with pkgs; pasystray.overrideAttrs (oldAttrs: rec {
|
|
||||||
buildInputs = oldAttrs.buildInputs ++ [libappindicator-gtk3];
|
|
||||||
});
|
|
||||||
customizable-notify-osd = with pkgs; notify-osd.overrideAttrs (oldAttrs: rec {
|
|
||||||
version = "0.9.35+16.04.20160415";
|
|
||||||
baseURI = "https://launchpad.net/~leolik/+archive/leolik";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "${baseURI}/+files/notify-osd_${version}-0ubuntu1-leolik~ppa0.tar.gz";
|
|
||||||
sha256 = "026dr46jh3xc4103wnslzy7pxbxkkpflh52c59j8vzwaa7bvvzkv";
|
|
||||||
name = "notify-osd-customizable.tar.gz";
|
|
||||||
};
|
|
||||||
preConfigure = "./autogen.sh --libexecdir=$(out)/bin";
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
glib libwnck3 libnotify dbus-glib gnome3.gsettings-desktop-schemas
|
|
||||||
makeWrapper libtool gnome3.gnome-common
|
|
||||||
];
|
|
||||||
});
|
|
||||||
keybase-gui-fixed = with pkgs; keybase-gui.overrideAttrs (oldAttrs: rec {
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
mv usr/share $out/share
|
|
||||||
mv opt/keybase $out/share/
|
|
||||||
cat > $out/bin/keybase-gui <<EOF
|
|
||||||
#!${stdenv.shell}
|
|
||||||
checkFailed() {
|
|
||||||
if [ "\$NIX_SKIP_KEYBASE_CHECKS" = "1" ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
echo "Set NIX_SKIP_KEYBASE_CHECKS=1 if you want to skip this check." >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
if [ ! -S "\$XDG_RUNTIME_DIR/keybase/keybased.sock" ]; then
|
|
||||||
echo "Keybase service doesn't seem to be running." >&2
|
|
||||||
echo "You might need to run: keybase service" >&2
|
|
||||||
checkFailed
|
|
||||||
fi
|
|
||||||
if [ -z "\$(keybase status | grep kbfsfuse)" ]; then
|
|
||||||
echo "Could not find kbfsfuse client in keybase status." >&2
|
|
||||||
echo "You might need to run: kbfsfuse" >&2
|
|
||||||
checkFailed
|
|
||||||
fi
|
|
||||||
exec $out/share/keybase/Keybase "\$@"
|
|
||||||
EOF
|
|
||||||
chmod +x $out/bin/keybase-gui
|
|
||||||
substituteInPlace $out/share/applications/keybase.desktop \
|
|
||||||
--replace run_keybase $out/bin/keybase-gui
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
nixpkgs.overlays = [ my-overlays ];
|
||||||
|
# XXX: This ensures that all nix tools pick up the overlays that are set here
|
||||||
|
nix.nixPath =
|
||||||
|
# Prepend default nixPath values.
|
||||||
|
options.nix.nixPath.default ++
|
||||||
|
# Append our nixpkgs-overlays.
|
||||||
|
[ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
@ -137,13 +72,14 @@ in
|
|||||||
kleopatra
|
kleopatra
|
||||||
gitter
|
gitter
|
||||||
google-chrome
|
google-chrome
|
||||||
|
dfeet
|
||||||
hexchat
|
hexchat
|
||||||
quassel
|
quassel
|
||||||
keybase-gui-fixed
|
keybase-gui-fixed
|
||||||
kodi
|
kodi
|
||||||
lxappearance
|
lxappearance
|
||||||
rxvt_unicode
|
rxvt_unicode
|
||||||
|
pulseeffects
|
||||||
spotify
|
spotify
|
||||||
termite
|
termite
|
||||||
vlc
|
vlc
|
||||||
@ -160,7 +96,7 @@ in
|
|||||||
# Desktop
|
# Desktop
|
||||||
# haskellPackages.status-notifier-item
|
# haskellPackages.status-notifier-item
|
||||||
autorandr
|
autorandr
|
||||||
clipit-master
|
clipit
|
||||||
compton
|
compton
|
||||||
feh
|
feh
|
||||||
gnome3.gpaste
|
gnome3.gpaste
|
||||||
@ -209,8 +145,9 @@ in
|
|||||||
# Tools
|
# Tools
|
||||||
bazaar
|
bazaar
|
||||||
binutils
|
binutils
|
||||||
dfeet
|
dex
|
||||||
dpkg
|
dpkg
|
||||||
|
file
|
||||||
gcc
|
gcc
|
||||||
gdb
|
gdb
|
||||||
gitAndTools.git-sync
|
gitAndTools.git-sync
|
||||||
@ -236,6 +173,7 @@ in
|
|||||||
silver-searcher
|
silver-searcher
|
||||||
stow
|
stow
|
||||||
tmux
|
tmux
|
||||||
|
unzip
|
||||||
valgrind
|
valgrind
|
||||||
wget
|
wget
|
||||||
wmctrl
|
wmctrl
|
||||||
|
@ -6,11 +6,15 @@
|
|||||||
, nwjs, pango, systemd }:
|
, nwjs, pango, systemd }:
|
||||||
|
|
||||||
let gitterDirectorySuffix = "opt/gitter";
|
let gitterDirectorySuffix = "opt/gitter";
|
||||||
doELFPatch = target: ''
|
doELFExePatch = target: ''
|
||||||
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
|
patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
|
||||||
--set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
|
--set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
|
||||||
$out/${gitterDirectorySuffix}/${target}
|
$out/${gitterDirectorySuffix}/${target}
|
||||||
'';
|
'';
|
||||||
|
doELFLibPatch = target: ''
|
||||||
|
patchelf --set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
|
||||||
|
$out/${gitterDirectorySuffix}/${target}
|
||||||
|
'';
|
||||||
libPath = stdenv.lib.makeLibraryPath [
|
libPath = stdenv.lib.makeLibraryPath [
|
||||||
alsaLib atk cairo cups dbus expat fontconfig freetype gdk_pixbuf glib
|
alsaLib atk cairo cups dbus expat fontconfig freetype gdk_pixbuf glib
|
||||||
gnome3.gconf gtk3 libX11 libXScrnSaver libXcomposite libXcursor libXdamage
|
gnome3.gconf gtk3 libX11 libXScrnSaver libXcomposite libXcursor libXdamage
|
||||||
@ -35,15 +39,16 @@ in stdenv.mkDerivation rec {
|
|||||||
mkdir -p $out/{bin,opt/gitter,share/pixmaps}
|
mkdir -p $out/{bin,opt/gitter,share/pixmaps}
|
||||||
mv ./opt/Gitter/linux64/* $out/opt/gitter
|
mv ./opt/Gitter/linux64/* $out/opt/gitter
|
||||||
|
|
||||||
${doELFPatch "Gitter"}
|
${doELFExePatch "Gitter"}
|
||||||
${doELFPatch "nacl_helper"}
|
${doELFExePatch "nacl_helper"}
|
||||||
${doELFPatch "minidump_stackwalk"}
|
${doELFExePatch "minidump_stackwalk"}
|
||||||
${doELFPatch "nwjc"}
|
${doELFExePatch "nwjc"}
|
||||||
${doELFPatch "chromedriver"}
|
${doELFExePatch "chromedriver"}
|
||||||
${doELFPatch "payload"}
|
${doELFExePatch "payload"}
|
||||||
|
|
||||||
patchelf --set-rpath "$out/${gitterDirectorySuffix}/lib:${libPath}" \
|
${doELFLibPatch "lib/libnw.so"}
|
||||||
$out/${gitterDirectorySuffix}/lib/libnw.so
|
${doELFLibPatch "lib/libnode.so"}
|
||||||
|
${doELFLibPatch "lib/libffmpeg.so"}
|
||||||
|
|
||||||
wrapProgram $out/${gitterDirectorySuffix}/Gitter --prefix LD_LIBRARY_PATH : ${libPath}
|
wrapProgram $out/${gitterDirectorySuffix}/Gitter --prefix LD_LIBRARY_PATH : ${libPath}
|
||||||
|
|
||||||
@ -54,7 +59,7 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = pname;
|
name = pname;
|
||||||
exec = "Gitter";
|
exec = "/usr/bin/env Gitter";
|
||||||
icon = pname;
|
icon = pname;
|
||||||
desktopName = "Gitter";
|
desktopName = "Gitter";
|
||||||
genericName = meta.description;
|
genericName = meta.description;
|
||||||
|
78
nixos/overlays.nix
Normal file
78
nixos/overlays.nix
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
self: super:
|
||||||
|
|
||||||
|
{
|
||||||
|
gitter = super.callPackage ./gitter.nix { };
|
||||||
|
clipit = super.clipit.overrideAttrs (oldAttrs: rec {
|
||||||
|
version = "50d983514386029a1f133187902084b753458f32";
|
||||||
|
preConfigure = "./autogen.sh";
|
||||||
|
configureFlags = ["--with-gtk3" "--enable-appindicator"];
|
||||||
|
src = super.fetchFromGitHub {
|
||||||
|
owner = "IvanMalison";
|
||||||
|
repo = "ClipIt";
|
||||||
|
sha256 = "1d52zjnxmcp2kr4wvq2yn9fhr61v9scp91fxfvasvz5m7k1zagdn";
|
||||||
|
rev = version;
|
||||||
|
};
|
||||||
|
buildInputs = with self; [
|
||||||
|
autoconf automake intltool gtk3 xdotool hicolor-icon-theme
|
||||||
|
libappindicator-gtk3
|
||||||
|
];
|
||||||
|
});
|
||||||
|
udiskie-appindicator = super.udiskie.overrideAttrs (oldAttrs: rec {
|
||||||
|
version = "1.7.5";
|
||||||
|
src = super.fetchFromGitHub {
|
||||||
|
owner = "coldfix";
|
||||||
|
repo = "udiskie";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "1mcdn8ha5d5nsmrzk6xnnsqrmk94rdrzym9sqm38zk5r8gpyl1k4";
|
||||||
|
};
|
||||||
|
propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [self.libappindicator-gtk3];
|
||||||
|
});
|
||||||
|
pasystray-appindicator = super.pasystray.overrideAttrs (oldAttrs: rec {
|
||||||
|
buildInputs = oldAttrs.buildInputs ++ [self.libappindicator-gtk3];
|
||||||
|
});
|
||||||
|
customizable-notify-osd = super.notify-osd.overrideAttrs (oldAttrs: rec {
|
||||||
|
version = "0.9.35+16.04.20160415";
|
||||||
|
baseURI = "https://launchpad.net/~leolik/+archive/leolik";
|
||||||
|
src = super.fetchurl {
|
||||||
|
url = "${baseURI}/+files/notify-osd_${version}-0ubuntu1-leolik~ppa0.tar.gz";
|
||||||
|
sha256 = "026dr46jh3xc4103wnslzy7pxbxkkpflh52c59j8vzwaa7bvvzkv";
|
||||||
|
name = "notify-osd-customizable.tar.gz";
|
||||||
|
};
|
||||||
|
preConfigure = "./autogen.sh --libexecdir=$(out)/bin";
|
||||||
|
buildInputs = with self; [
|
||||||
|
glib libwnck3 libnotify dbus-glib gnome3.gsettings-desktop-schemas
|
||||||
|
makeWrapper libtool gnome3.gnome-common
|
||||||
|
];
|
||||||
|
});
|
||||||
|
keybase-gui-fixed = super.keybase-gui.overrideAttrs (oldAttrs: rec {
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
mv usr/share $out/share
|
||||||
|
mv opt/keybase $out/share/
|
||||||
|
cat > $out/bin/keybase-gui <<EOF
|
||||||
|
#!${self.stdenv.shell}
|
||||||
|
checkFailed() {
|
||||||
|
if [ "\$NIX_SKIP_KEYBASE_CHECKS" = "1" ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
echo "Set NIX_SKIP_KEYBASE_CHECKS=1 if you want to skip this check." >&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
if [ ! -S "\$XDG_RUNTIME_DIR/keybase/keybased.sock" ]; then
|
||||||
|
echo "Keybase service doesn't seem to be running." >&2
|
||||||
|
echo "You might need to run: keybase service" >&2
|
||||||
|
checkFailed
|
||||||
|
fi
|
||||||
|
if [ -z "\$(keybase status | grep kbfsfuse)" ]; then
|
||||||
|
echo "Could not find kbfsfuse client in keybase status." >&2
|
||||||
|
echo "You might need to run: kbfsfuse" >&2
|
||||||
|
checkFailed
|
||||||
|
fi
|
||||||
|
exec $out/share/keybase/Keybase "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/keybase-gui
|
||||||
|
substituteInPlace $out/share/applications/keybase.desktop \
|
||||||
|
--replace run_keybase $out/bin/keybase-gui
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user