[Nix-dev] Re: [Nix-commits] SVN commit: nix - 12563 - raskin - in nixpkgs/trunk/pkgs: os-specific/linux/klibc top-level

Eelco Dolstra e.dolstra at tudelft.nl
Mon Aug 11 11:59:18 CEST 2008


Michael Raskin wrote:

> Author: raskin
> -{stdenv, fetchurl, perl, bison, mktemp, kernel}:
> +{stdenv, fetchurl, perl, bison, mktemp, kernel
> +  , version ? "1.5"
> +  , sha256 ?  "1izhf8kscjymsvsvhcqw9awnmp94vwv70zdj09srg9bkpjj0n017"
> +  , subdir ? ""
> +}:

I don't think this is a good idea, unless there is a very good reason for 
needing this kind of configurability.  Generally, the package function should 
know how to build a package - the call site should only pass in the dependencies 
and feature flags.

If really needed, it would be better to pass a "src" argument rather than 
{version, sha256, subdir}.

> -    klibc = import ../os-specific/linux/klibc {
> +    klibc = composedArgsAndFun (import ../os-specific/linux/klibc) {
>        inherit fetchurl stdenv perl bison mktemp kernel;
> -    };
> +    } null;

What does "composedArgsAndFun" do?  (And it's almost certainly not a good name 
;-)  Also, I really dislike all those weird nulls in all-packages.nix.

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list