mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 21:53:32 +00:00
bad07dfac5
Quoting from the splitString docstring: NOTE: this function is not performant and should never be used. This replaces trivial uses of splitString for splitting version strings with the (potentially builtin) splitVersion.
12 lines
183 B
Nix
12 lines
183 B
Nix
lib: version:
|
|
|
|
with lib;
|
|
|
|
let
|
|
fragments = splitVersion version;
|
|
major = head fragments;
|
|
minor = concatMapStrings (fixedWidthNumber 2) (tail fragments);
|
|
in
|
|
|
|
major + minor + "00"
|