query
On this page

sanitizeDerivationName

lib.strings.sanitizeDerivationName

Docs pulled from | This Revision | about 12 hours ago


Creates a valid derivation name from a potentially invalid one.

Type

sanitizeDerivationName :: String -> String

Examples

sanitizeDerivationName usage example

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