Valid Nix store path names: Difference between revisions

From NixOS Wiki
imported from old wiki
Klinger (talk | contribs)
m Category:Nix added
 
Line 12: Line 12:
* https://discourse.nixos.org/t/clarification-on-package-names-and-versions/9819/8
* https://discourse.nixos.org/t/clarification-on-package-names-and-versions/9819/8
* function <code>checkName</code> in https://github.com/NixOS/nix/blob/master/src/libstore/path.cc
* function <code>checkName</code> in https://github.com/NixOS/nix/blob/master/src/libstore/path.cc
[[Category:Nix]]

Latest revision as of 19:48, 13 September 2024

All files and folders in /nix/store match the regular expression

[0-9a-z]{32}-[-.+_?=0-9a-zA-Z]+
  • [0-9a-f]{32} is the hash
  • [-.+_?=0-9a-zA-Z]+ is the name

See also