Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created January 15, 2019 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/7766657dbc3d3b13c7911d62a00f5fac to your computer and use it in GitHub Desktop.
Save grahamc/7766657dbc3d3b13c7911d62a00f5fac to your computer and use it in GitHub Desktop.
drv: derivation (drv.drvAttrs // {
name = "keep-env-hack-${drv.name}";
origBuilder = drv.builder;
builder = builtins.storePath nixConfig.shell;
origSystem = drv.system;
system = builtins.currentSystem;
origPATH = drv.PATH or "";
PATH = builtins.storePath nixConfig.coreutils;
origArgs = drv.args;
args = [ (builtins.toFile "keep-env-hack" ''
env > $out
'') ];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment