diff options
-rw-r--r-- | default.nix | 4 | ||||
-rw-r--r-- | pkgs/larbs-scripts/default.nix | 2 | ||||
-rw-r--r-- | pkgs/larbs-scripts/displayselect.nix (renamed from pkgs/larbs-scripts/displayselect/wrapper.nix) | 0 | ||||
-rw-r--r-- | pkgs/larbs-scripts/displayselect/default.nix | 6 | ||||
-rw-r--r-- | pkgs/larbs-scripts/displayselect/displayselect.nix | 13 | ||||
-rw-r--r-- | pkgs/larbs-scripts/new_ds.nix | 29 |
6 files changed, 31 insertions, 23 deletions
diff --git a/default.nix b/default.nix index 26897f1..7e3b1d9 100644 --- a/default.nix +++ b/default.nix @@ -10,8 +10,6 @@ let wrapNeomutt = pkgs.callPackage ./pkgs/neomutt_configurable/wrapper.nix { }; - wrapDS = pkgs.callPackage ./pkgs/larbs-scripts/displayselect/wrapper.nix { }; - displayselect_unwrapped = pkgs.callPackage ./pkgs/larbs-scripts/displayselect/displayselect.nix { }; in { # The `lib`, `modules`, and `overlay` names are special @@ -31,7 +29,7 @@ in larbs-nvim = pkgs.callPackage ./pkgs/larbs-nvim { }; dmenuunicode = pkgs.callPackage ./pkgs/dmenuunicode { }; larbs-scripts = pkgs.callPackage ./pkgs/larbs-scripts { }; - displayselect = wrapDS displayselect_unwrapped { }; + 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 6bff5cd..38cbcd0 100644 --- a/pkgs/larbs-scripts/default.nix +++ b/pkgs/larbs-scripts/default.nix @@ -2,7 +2,7 @@ with stdenv.lib; let setbg = callPackage ./setbg.nix { }; - ds = callPackage ./displayselect { }; + ds = callPackage ./new_ds.nix { }; in buildEnv { name = "larbs-scripts"; diff --git a/pkgs/larbs-scripts/displayselect/wrapper.nix b/pkgs/larbs-scripts/displayselect.nix index 9fc2536..9fc2536 100644 --- a/pkgs/larbs-scripts/displayselect/wrapper.nix +++ b/pkgs/larbs-scripts/displayselect.nix diff --git a/pkgs/larbs-scripts/displayselect/default.nix b/pkgs/larbs-scripts/displayselect/default.nix deleted file mode 100644 index f7e0c7f..0000000 --- a/pkgs/larbs-scripts/displayselect/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ callPackage }: -let - wrapDS = callPackage ./wrapper.nix { }; - ds = callPackage ./displayselect.nix { }; -in - wrapDS ds { } diff --git a/pkgs/larbs-scripts/displayselect/displayselect.nix b/pkgs/larbs-scripts/displayselect/displayselect.nix deleted file mode 100644 index e643924..0000000 --- a/pkgs/larbs-scripts/displayselect/displayselect.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ stdenv, callPackage }: -let - voidrice = callPackage ../../voidrice.nix { }; -in - stdenv.mkDerivation { - name = "displayselect"; - src = voidrice; - - installPhase = '' - mkdir -p $out/bin - cp ${voidrice}/.local/bin/displayselect $out/bin/displayselect - ''; - } diff --git a/pkgs/larbs-scripts/new_ds.nix b/pkgs/larbs-scripts/new_ds.nix new file mode 100644 index 0000000..4ab6377 --- /dev/null +++ b/pkgs/larbs-scripts/new_ds.nix @@ -0,0 +1,29 @@ +{ 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 + ''; + + }) |