File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77# Visit https://aboutcode.org and https://github.com/aboutcode-org/univers for support and download.
88
99"""
10- Python port of Nix's ``builtins.compareVersions``.
11- https://nix.dev/manual/nix/latest/language/builtins.html#builtins-compareVersions
10+ Compare version strings of software distributed through Nixpkgs. Refer to
11+ Nixpkgs contributor documentation on how versioning is handled there:
12+ https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#versioning
13+
14+ Note that Nix version handling is not authoritative for versioning syntax or
15+ semantics in Nixpkgs. It's merely a compatibility constraint for supporting
16+ unmaintained legacy Nix use cases around ``nix-env``. But one can assume that
17+ versions of a given package from any Nixpkgs release will be ordered correctly
18+ by Nix, which is why it's included here.
1219
20+ The ordering is that of Nix's ``builtins.compareVersions``:
21+ https://nix.dev/manual/nix/latest/language/builtins.html#builtins-compareVersions
1322The reference implementation is ``compareVersions`` and ``componentsLT`` in
1423https://github.com/NixOS/nix/blob/534f199c9a34ace17d4db26fa3d377ee904bdf03/src/libstore/names.cc
1524and this port reproduces it exactly:
You can’t perform that action at this time.
0 commit comments