mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 08:44:31 +00:00
trivial-builders: Sanitize derivation name
This then supports using functions like writeShellScriptBin with script names that would be invalid as derivation names
This commit is contained in:
parent
1c951b1484
commit
c60e559e13
@ -4,7 +4,8 @@ let
|
||||
|
||||
runCommand' = runLocal: stdenv: name: env: buildCommand:
|
||||
stdenv.mkDerivation ({
|
||||
inherit name buildCommand;
|
||||
name = lib.strings.sanitizeDerivationName name;
|
||||
inherit buildCommand;
|
||||
passAsFile = [ "buildCommand" ];
|
||||
}
|
||||
// (lib.optionalAttrs runLocal {
|
||||
|
Loading…
Reference in New Issue
Block a user