diff options
author | ene <ene@sils.li> | 2023-02-19 19:13:36 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-02-19 19:13:36 +0100 |
commit | 0499e3ab958d132dfa0a75487dbef97febfd1158 (patch) | |
tree | 6b13936df3a6101b179c4683b1cfbab820ac124b /bootstrap/default.nix | |
parent | Fix(bootstrap): Remove false btrfs subvolume (diff) | |
download | nixos-config-0499e3ab958d132dfa0a75487dbef97febfd1158.tar.gz nixos-config-0499e3ab958d132dfa0a75487dbef97febfd1158.zip |
Feat(bootstrap): Separate the builder to a library
Diffstat (limited to 'bootstrap/default.nix')
-rw-r--r-- | bootstrap/default.nix | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/bootstrap/default.nix b/bootstrap/default.nix index e013ade4..8cd7b394 100644 --- a/bootstrap/default.nix +++ b/bootstrap/default.nix @@ -1,18 +1,12 @@ +# vim: ts=2 { pkgs, shell-library, ... -}: -#pkgs.writeShellScriptBin "install" (builtins.readFile ./install) -let +}: let dependencies = with pkgs; [jq dash]; name = "install"; + script = ./install; + lib = import ../lib {inherit pkgs shell-library;}; in - pkgs.runCommandLocal name { - nativeBuildInputs = [pkgs.makeWrapper] ++ dependencies; - } '' - install -m755 ${./install} -D "$out/bin/${name}" - sed -i 's|%SHELL_LIBRARY_PATH|${shell-library}/lib|' "$out/bin/${name}" - #patchShebangs "$out/bin/${name}" - wrapProgram "$out/bin/${name}" --prefix PATH : ${pkgs.lib.makeBinPath dependencies} - '' + lib.makeShellScriptWithLibrary {inherit dependencies name script;} |