nix-helpers: d8e9a843e9dbf042403e071167669be6ab1e9246

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

Generated by git2html.