about summary refs log tree commit diff
path: root/pkgs/larbs-scripts/new_ds.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/larbs-scripts/new_ds.nix')
-rw-r--r--pkgs/larbs-scripts/new_ds.nix29
1 files changed, 29 insertions, 0 deletions
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
+    '';
+
+  })