[Nix-dev] Including "beta" or "unstable" identifiers in package names?
Shea Levy
shea at shealevy.com
Tue Aug 30 11:40:35 CEST 2016
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 <setori88 at gmail.com> 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"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160830/95c8654e/attachment.sig>
More information about the nix-dev
mailing list