diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-10-05 22:25:33 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2020-10-05 22:25:33 +0200 |
commit | 9be00a1b0eaa19d3784c3abb823f3e2ebe80f716 (patch) | |
tree | e5c257478b7ac4ca7bcfd2be0c057631fd6f5e3a | |
parent | f1055110d259c36d7c3a968db3c5120341553a6c (diff) | |
download | pnpkgs-9be00a1b0eaa19d3784c3abb823f3e2ebe80f716.tar.gz pnpkgs-9be00a1b0eaa19d3784c3abb823f3e2ebe80f716.zip |
Update larbs-scripts
-rw-r--r-- | default.nix | 2 | ||||
-rw-r--r-- | pkgs/larbs-scripts/default.nix | 4 | ||||
-rw-r--r-- | pkgs/larbs-scripts/displayselect.nix | 28 | ||||
-rw-r--r-- | pkgs/larbs-scripts/dmenuunicode.nix (renamed from pkgs/dmenuunicode/default.nix) | 13 | ||||
-rw-r--r-- | pkgs/larbs-scripts/new_ds.nix | 29 |
5 files changed, 17 insertions, 59 deletions
diff --git a/default.nix b/default.nix index 7e3b1d9..52577e4 100644 --- a/default.nix +++ b/default.nix @@ -27,9 +27,7 @@ in larbs-mail = pkgs.callPackage ./pkgs/larbs-mail { }; larbs-news = pkgs.callPackage ./pkgs/larbs-news { }; larbs-nvim = pkgs.callPackage ./pkgs/larbs-nvim { }; - dmenuunicode = pkgs.callPackage ./pkgs/dmenuunicode { }; larbs-scripts = pkgs.callPackage ./pkgs/larbs-scripts { }; - displayselect = pkgs.callPackage ./pkgs/larbs-scripts/new_ds.nix { }; #fx = (pkgs.callPackage ./pkgs/fx { }).package; # xcb-util = pkgs.callPackage ./pkgs/xcb-util { }; #unknown error diff --git a/pkgs/larbs-scripts/default.nix b/pkgs/larbs-scripts/default.nix index 38cbcd0..b4e2c8a 100644 --- a/pkgs/larbs-scripts/default.nix +++ b/pkgs/larbs-scripts/default.nix @@ -2,13 +2,13 @@ with stdenv.lib; let setbg = callPackage ./setbg.nix { }; - ds = callPackage ./new_ds.nix { }; + displayselect = callPackage ./displayselect.nix { }; in buildEnv { name = "larbs-scripts"; paths = [ setbg - ds + displayselect ]; meta = { diff --git a/pkgs/larbs-scripts/displayselect.nix b/pkgs/larbs-scripts/displayselect.nix index 9fc2536..54b6fe1 100644 --- a/pkgs/larbs-scripts/displayselect.nix +++ b/pkgs/larbs-scripts/displayselect.nix @@ -1,21 +1,12 @@ -{ stdenv, buildEnv, callPackage, lib, xrandr, libnotify, arandr }: - -displayselect: +{ stdenv, buildEnv, callPackage, xrandr, libnotify, arandr }: +with stdenv.lib; let - - mapCase = options: - builtins.concatStringsSep "\n" - (builtins.map - (option: "\t\"${option}\") ${builtins.getAttr option options} ;;") - (builtins.attrNames options)); - - wrapper = { moreOptions ? {} }: - let - dmenu = callPackage ../../dmenu { }; - in + voidrice = callPackage ../voidrice.nix { }; + dmenu = callPackage ../dmenu { }; +in buildEnv { - name = "displayselect-env"; + name = "displayselect"; paths = [ xrandr @@ -26,8 +17,7 @@ let postBuild = '' mkdir -p $out/bin - cp ${displayselect}/bin/displayselect $out/bin - echo ${mapCase moreOptions} >> $out/bin/test + cp ${voidrice}/.local/bin/displayselect $out/bin ''; @@ -35,6 +25,4 @@ let description = "A fancy monitor configuration menu."; homepage = "https://github.com/LukeSmithXYZ/voidrice"; }; - }; -in - lib.makeOverridable wrapper + } diff --git a/pkgs/dmenuunicode/default.nix b/pkgs/larbs-scripts/dmenuunicode.nix index 2cb6b70..29070cf 100644 --- a/pkgs/dmenuunicode/default.nix +++ b/pkgs/larbs-scripts/dmenuunicode.nix @@ -1,12 +1,12 @@ -{ stdenv, fetchgit }: +{ stdenv, callPackage }: +let + voidrice = callPackage ../voidrice.nix { }; + dmenu = callPackage ../dmenu { }; +in stdenv.mkDerivation { name = "dmenuunicode"; - src = fetchgit { - url = "https://github.com/LukeSmithxyz/voidrice"; - rev = "d92bd73428f7c13ec3c3860ab8ee518c336ec458"; - sha256 = "1gjls1x3r7i0y6f3fkzhfqfv9zc6l6b2q13zygzcggqcwc3xmanm"; - }; + src = voidrice; installPhase = '' mkdir -p $out/bin @@ -14,6 +14,7 @@ stdenv.mkDerivation { cp .local/share/larbs/emoji $out/share sed -i "s:~/.local/share/larbs/emoji:$out/share/emoji:" .local/bin/dmenuunicode + sed -i "s:dmenu:${dmenu}/bin/dmenu:g" .local/bin/dmenuunicode cp .local/bin/dmenuunicode $out/bin ''; } diff --git a/pkgs/larbs-scripts/new_ds.nix b/pkgs/larbs-scripts/new_ds.nix deleted file mode 100644 index 4ab6377..0000000 --- a/pkgs/larbs-scripts/new_ds.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ callPackage, lib, buildEnv }: -let - mapCase = options: - builtins.concatStringsSep "\n" - (builtins.map - (option: "\t\"${option}\") ${builtins.getAttr option options} ;;") - (builtins.attrNames options)); - -in - -lib.makeOverridable ( - { moreOptions ? {} }: - let - voidrice = callPackage ../voidrice.nix { }; - dmenu = callPackage ../dmenu { }; - in - buildEnv { - name = "displayselect"; - - paths = [ - dmenu - ]; - - postBuild = '' - echo '${mapCase moreOptions}' > $out/bin/test - cp ${voidrice}/.local/bin/displayselect $out/bin - ''; - - }) |