[Nix-dev] BuilderDefs

Eelco Dolstra e.dolstra at tudelft.nl
Sun Sep 11 20:36:56 CEST 2011


Hi,

On 09/11/2011 06:45 PM, Michael Raskin wrote:

> +x@{builderDefsPackage
> +  , ...}:
> +builderDefsPackage
> +(a :
> +let
> +  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
> +    [];
(snip)

Could you stick to the standard way of writing packages?  That is,

   { stdenv, fetchurl }:

   stdenv.mkDerivation {
     name = "libmodplug-0.8.8.4";

     src = fetchurl { ... };

     meta = ...;
   }

That style is easier to read, shorter, uses fewer strange idioms 
(‘helperArgNames’?), is better documented, and easier to maintain by 
others (because it is the standard notation).

The purported advantage of builderDefs (making it easier to customise 
build phases etc.) I haven't really seen in practice ­— stdenv's 
setup.sh has plenty of customisation mechanisms.

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



More information about the nix-dev mailing list