about summary refs log tree commit diff stats
path: root/bootstrap/default.nix
diff options
context:
space:
mode:
authorene <ene@sils.li>2023-02-19 16:55:05 +0100
committerene <ene@sils.li>2023-02-19 16:56:15 +0100
commit48e02230c3860a589b41d302b4d2b13d57d55bde (patch)
tree32d3e8accb505ff0b9dacb36afbeb9d43b43659d /bootstrap/default.nix
parentFix(bootstrap): Finish the nix side of things (diff)
downloadnixos-config-48e02230c3860a589b41d302b4d2b13d57d55bde.tar.gz
nixos-config-48e02230c3860a589b41d302b4d2b13d57d55bde.zip
Fix(bootstrap): Declare dependencies
Diffstat (limited to 'bootstrap/default.nix')
-rw-r--r--bootstrap/default.nix20
1 files changed, 18 insertions, 2 deletions
diff --git a/bootstrap/default.nix b/bootstrap/default.nix
index 29dda5c0..eeadb837 100644
--- a/bootstrap/default.nix
+++ b/bootstrap/default.nix
@@ -1,2 +1,18 @@
-{pkgs, ...}:
-pkgs.writeShellScriptBin "install" (builtins.readFile ./install)
+{
+  pkgs,
+  shell-library,
+  ...
+}:
+#pkgs.writeShellScriptBin "install" (builtins.readFile ./install)
+let
+  dependencies = with pkgs; [jq dash];
+  name = "install";
+in
+  pkgs.runCommandLocal name {
+    nativeBuildInputs = [pkgs.makeWrapper] ++ dependencies;
+  } ''
+        install -m755 ${./install} -D "$out/bin/${name}"
+        sed -i 's|%SHELL_LIBRARY_PATH|${shell-library}|' "$out/bin/${name}"
+    #patchShebangs "$out/bin/${name}"
+        wrapProgram "$out/bin/${name}" --prefix PATH : ${pkgs.lib.makeBinPath dependencies}
+  ''