Hi Stewart,
'shortVersion' is an argument to rustc.nix, but it's not how nix parses
the version. nix looks at the name argument (which, looking at
rustc.nix, is set to "rustc-${version}", with version set to if
isRelease then shortVersion else "${shortVersion}-g${builtins.substring
0 7 srcRev}") and parses out the version from there. The version parsing
code is here:
https://github.com/NixOS/nix/blob/1.11.3/src/libexpr/names.cc#L14-L30 ,
in summary the version is everything following the first dash that isn't
followed by a letter. So if the name ends up as rustc-beta-2016-08-17,
nix parses "rustc-beta" as the name and "2016-08-17" as the version.Thanks, Shea stewart mackenzie <[email protected]> writes: > Trying to understand your email: > > in development/compilers/rust > > beta.nix: > current behaviour: the name "beta" is already part of the version -> > see "shortVersion" > "... > rustc = callPackage ./rustc.nix { > shortVersion = "beta-2016-08-17"; > ..." > https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/rust/beta.nix#L5-L6 > > in head.nix > current behaviour: the name "master" is already part of the version -> > see "shortVersion" > "... > rustc = callPackage ./rustc.nix { > shortVersion = "master-1.13.0"; > ..." > > https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/compilers/rust/head.nix#L5-L6 > > I don't understand: "IMO the 'beta' and 'master' is part of the > version, not the package name, and so if it exists at all it should be > part of the version string;" as it quite clearly is part of the "shortVersion"
signature.asc
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
