[Nix-dev] another style proposal
Lluís Batlle
viriketo at gmail.com
Sat Apr 3 11:19:42 CEST 2010
I prefer having an idea of the dependencies of a package in the
all-packages.nix file.
2010/4/3 Yury G. Kudryashov <urkud+nix at ya.ru>:
> 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
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev
>
More information about the nix-dev
mailing list