query
On this page

sanitizeDerivationName

lib.strings.sanitizeDerivationName

Docs pulled from | This Revision | 33 minutes ago


Creates a valid derivation name from a potentially invalid one.

Inputs

string
1. Function argument

Type

sanitizeDerivationName :: String -> String

Examples

lib.strings.sanitizeDerivationName usage example

sanitizeDerivationName "../hello.bar # foo"
=> "-hello.bar-foo"
sanitizeDerivationName ""
=> "unknown"
sanitizeDerivationName pkgs.hello
=> "-nix-store-2g75chlbpxlrqn15zlby2dfh8hr9qwbk-hello-2.10"