vars: add generator.runtimeInputs #1705
@ -8,7 +8,7 @@
|
|||||||
finalScript = lib.mkOptionDefault ''
|
finalScript = lib.mkOptionDefault ''
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
export PATH="${lib.makeBinPath config.path}:${pkgs.coreutils}/bin"
|
export PATH="${lib.makeBinPath config.runtimeInputs}:${pkgs.coreutils}/bin"
|
||||||
|
|
||||||
${lib.optionalString (pkgs.stdenv.hostPlatform.isLinux) ''
|
${lib.optionalString (pkgs.stdenv.hostPlatform.isLinux) ''
|
||||||
# prepare sandbox user on platforms where this is supported
|
# prepare sandbox user on platforms where this is supported
|
||||||
|
@ -8,6 +8,7 @@ let
|
|||||||
either
|
either
|
||||||
enum
|
enum
|
||||||
listOf
|
listOf
|
||||||
|
package
|
||||||
path
|
path
|
||||||
str
|
str
|
||||||
submoduleWith
|
submoduleWith
|
||||||
@ -31,7 +32,7 @@ in
|
|||||||
generators = {
|
generators = {
|
||||||
default = {
|
default = {
|
||||||
imports = [
|
imports = [
|
||||||
# default implementation of the generator
|
# implementation of the generator
|
||||||
./generator.nix
|
./generator.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -109,6 +110,14 @@ in
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
runtimeInputs = {
|
||||||
|
description = ''
|
||||||
|
A list of packages that the generator script requires.
|
||||||
|
These packages will be available in the PATH when the script is run.
|
||||||
|
'';
|
||||||
|
type = listOf package;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
script = {
|
script = {
|
||||||
description = ''
|
description = ''
|
||||||
The script to run to generate the files.
|
The script to run to generate the files.
|
||||||
@ -129,6 +138,7 @@ in
|
|||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
internal = true;
|
internal = true;
|
||||||
|
visible = false;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user