forked from lix-project/lix
94e91566ed
Add a new experimental `impure-env` setting that is a key-value list of environment variables to inject into FOD derivations that specify the corresponding `impureEnvVars`. This allows clients to make use of this feature (without having to change the environment of the daemon itself) and might eventually deprecate the current behaviour (pick whatever is in the environment of the daemon) as it's more principled and might prevent information leakage.
17 lines
276 B
Nix
17 lines
276 B
Nix
{ var, value }:
|
|
|
|
with import ./config.nix;
|
|
|
|
mkDerivation {
|
|
name = "test";
|
|
buildCommand = ''
|
|
echo ${var} = "''$${var}"
|
|
echo -n "''$${var}" > "$out"
|
|
'';
|
|
|
|
impureEnvVars = [ var ];
|
|
|
|
outputHashAlgo = "sha256";
|
|
outputHash = builtins.hashString "sha256" value;
|
|
}
|