mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-16 03:06:17 +02:00
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.
16 lines
276 B
Nix
16 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;
|
|
}
|