nix-helpers: cc644dc24fcdc396bd816df03d33927392bdd024
1: {
2: lib,
3: nix,
4: runCommand,
5: writeScript,
6: }:
7: with builtins;
8: with lib;
9:
10: env: text:
11:
12: # Allows us to call Nix commands from our scripts
13: let
14: nixEnv = env // {
15: NIX_REMOTE = "daemon";
16: NIX_PATH = builtins.getEnv "NIX_PATH";
17: buildInputs = [ nix ] ++ (if env ? buildInputs then env.buildInputs else [ ]);
18: };
19: script = writeScript "script" text;
20: runner = runCommand "runner" nixEnv script;
21: in
22: readFile "${runner}"
Generated by git2html.