[Nix-dev] Re: Getting package name & version from URL

Ludovic Courtès ludo at gnu.org
Mon Aug 11 10:37:04 CEST 2008


Hi,

pjotr2008 at thebird.nl (Pjotr Prins) writes:

> Quite a few packages have duplications of version numbers hard-coded.
> One way to prevent that is defining a variable 'version'.

Often, using "recursive" attribute sets avoids duplication:

  stdenv.mkDerivation rec {
    name = "foo-1.2";
    src = fetchurl {
      url = "mirror://.../${name}.tar.gz";

  ...

Thanks,
Ludovic.




More information about the nix-dev mailing list