Hi!

I propose to use the following style.

In all-packages.nix:

mypkg = makeOverridable (import ../path/to/mypkg) ( pkgs // { cg = 
getPkgConfig "mypkg"; } );

In mypkg/default.nix:

a:
let
  inherit (a) stdenv fetchurl other things cg;
  inherit (a.gtkLibs) gtk glib;
in

stdenv.mkDerivation {
  buildInputs = if cg "gtk" false then [ gtk glib ] else [];
}

Are there any objections against this style? All the arguments are listed in 
"let" block.

_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to