diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-04-15 00:30:15 +0200 |
---|---|---|
committer | Silvan Mosberger <contact@infinisil.com> | 2020-04-15 00:31:57 +0200 |
commit | c60e559e130bc8b0b32471cf31f51237138c10c2 (patch) | |
tree | 9264f8dfee6187bacea2473d2ed880ae28042310 /pkgs/build-support | |
parent | 1c951b1484ebf0efc2024dc5fad252bcefe5369b (diff) |
trivial-builders: Sanitize derivation name
This then supports using functions like writeShellScriptBin with script names that would be invalid as derivation names
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/trivial-builders.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index c67f5845135b3..3c81a4ece657e 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -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 { |