about summary refs log tree commit diff stats
path: root/bootstrap/default.nix
blob: e013ade4b1da439eab595a6a8030dff2bee237d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  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}/lib|' "$out/bin/${name}"
    #patchShebangs "$out/bin/${name}"
        wrapProgram "$out/bin/${name}" --prefix PATH : ${pkgs.lib.makeBinPath dependencies}
  ''