diff options
author | ene <ene@sils.li> | 2023-03-21 16:33:23 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-03-21 16:33:23 +0100 |
commit | b6f5b32eff33fb561e742b0f7b156e1bf954c6cb (patch) | |
tree | a4295a1f13e00450f0eefa576bef0c669d12cd1d /lib | |
parent | Fix(bootstrap/install): Add btrfs-progs as dependency (diff) | |
download | nixos-config-b6f5b32eff33fb561e742b0f7b156e1bf954c6cb.tar.gz nixos-config-b6f5b32eff33fb561e742b0f7b156e1bf954c6cb.zip |
Fix(lib): Add 'mktemp' as a default dependency
This is fine because the shell-library depends on it.
Diffstat (limited to '')
-rw-r--r-- | lib/default.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/default.nix b/lib/default.nix index 20088dc4..38301ea0 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -2,20 +2,25 @@ pkgs, shell-library, ... -}: { +}: let + shellLibraryDeps = + builtins.attrValues {inherit (pkgs) mktemp;}; +in { makeShellScriptWithLibrary = { dependencies, name, script, ... - }: + }: let + shellDependencies = dependencies ++ shellLibraryDeps; + in pkgs.runCommandLocal name { - nativeBuildInputs = [pkgs.makeWrapper] ++ dependencies; + nativeBuildInputs = [pkgs.makeWrapper] ++ shellDependencies; } '' install -m755 ${script} -D "$out/bin/${name}" sed -i 's|%SHELL_LIBRARY_PATH|${shell-library}/lib|' "$out/bin/${name}" patchShebangs "$out/bin/${name}" - wrapProgram "$out/bin/${name}" --set PATH ${pkgs.lib.makeBinPath dependencies} + wrapProgram "$out/bin/${name}" --set PATH ${pkgs.lib.makeBinPath shellDependencies} ''; makeShellScriptWithLibraryUnwrapped = { |