[Nix-dev] Nix User Guide comments
Eelco Dolstra
eelco at cs.uu.nl
Wed Feb 22 23:16:39 CET 2006
Hi Clemens,
On Mon, 20 Feb 2006 21:21:30 +0100
Clemens Tolboom <ctolboom at home.nl> wrote:
> Hi there,
>
> i'm still stuck at chapter 5 but got (much?) wiser:
>
> LittleWizard needs:
> - gtk >= 2.4
> - pkgconfig
>
> nixpkgs-0.10pre4851 contains gtkLibs ... how to get gtk?
gtkLibs is actually an attribute set containing several packages ("gtk",
"glib", "atk" and "pango") - see e.g.
pkgs/development/libraries/gtk-libs-2.8/default.nix. So what you
probably want in the expression for littlewizard is something like this:
{stdenv, fetchurl, perl, gtk, ... (other dependencies like glib as
appropriate) ...}:
stdenv.mkDerivation {
...
buildInputs = [perl gtk ...];
}
and then call this expression in all-packages-generic.nix like this:
littlewizard = import ../games/littlewizard {
inherit fetchurl stdenv perl;
inherit (gtkLibs) gtk ...;
};
The syntax "inherit (gtkLibs) gtk" is equivalent to
gtk = gtkLibs.gtk
by the way.
I hope this helps.
--
Eelco Dolstra | http://www.cs.uu.nl/~eelco
More information about the nix-dev
mailing list