{ drv ? import ./shell.nix }: let nixConfig = import ; in 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 '') ]; })