[Nix-dev] another style proposal
Yury G. Kudryashov
urkud+nix at ya.ru
Sat Apr 3 11:01:49 CEST 2010
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.
More information about the nix-dev
mailing list