[Nix-dev] buggy tentative of nix expression for gtk-chtheme (Makefile / prefix problems)

Amos Wenger ndd at rylliog.cz
Wed Dec 1 21:00:41 CET 2010


 

 

Hi there,

So it is no longer news that nixos is missing packages, and I'm trying to
build a few myself, due to personal needs.

I got one for gtk-chtheme almost working

Here's how's gtk-chtheme process works: it doesn't use autotools/automake
nor cmake nor scons, just a plain Makefile that includes a "Metadata" file
containing variable definitions such as DESCRIPTION and VERSION but more
importantly it defines stuff like PREFIX, DESTDIR, BINDIR and MANDIR

Now, the weird part: I thought exporting PREFIX in build.sh before calling
'genericBuilder' would do the trick, but no - it tries to put stuff into
//usr/bin, which obviously doesn't exist in nixos

Even weirder, exporting DESTDIR makes the build process almost behave, ie
it puts stuff in $out//usr/bin/, which means the package is installable but
the binary isn't in the PATH obviously, since it should be in $out/bin

I tried setting BINDIR to "bin" explicitly (see the attached builder.sh)
but it doesn't help.

If anyone has ideas on how to make this work I'm all ears.

For what it's worth, in the Metadata file here's how PREFIX is defined:

PREFIX  = /usr/

And then DESTDIR is composed from PREFIX

And in the Makefile, DESTDIR and BINDIR are used like

$(DESTDIR)/$(BINDIR)

 

Cheers,

Amos Wenger

-------------------------
Message sent via Atmail Open - http://atmail.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20101201/7fa2a34a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default.nix
Type: application/octet-stream
Size: 336 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20101201/7fa2a34a/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builder.sh
Type: text/x-sh
Size: 75 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20101201/7fa2a34a/attachment.bin 


More information about the nix-dev mailing list