[Nix-dev] ./configure && make && make install

Sergey Mironov ierton at gmail.com
Tue Jan 3 19:38:51 CET 2012


2012/1/3 Peter Simons <simons at cryp.to>

> Hi Sergey,
>
>  >   unpack-the-tarball && ./configure && make && make install
>  >
>  > doesn't work in nixos because of missing /usr/include and /usr/lib.
>
> a fairly simple solution is to create a Nix profile that contains all
> the standard libraries (glibc, openssl, coreutils, etc.) and to
> configure environment variables C_INCLUDE_PATH, LIBRARY_PATH, etc. so
> that they point into that profile. This means that gcc is going to find
> all those components automatically, so ./configure is usually going to
> work fine.
>
> Take care,
> Peter
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>

Thanks, it works, but I see another thing that confuses me. Let's say I
want to develop an application which depends on libX11. Originally, my
/var/run/current-system/sw had no include/X11/X.h and lib/X11/libX11.so,
but I knew they do exist somewhere because I see X-server starts every time
I boot the system.
I added

   environment.systemPackages = with pkgs ; [
     ...
     xlibs.libX11
     xlibs.xproto
   ];

to my /etc/nixos/configuration.nix and executed rebuild. Ok, includes and
libs of X11 have appeared and now I can use
C_INCLUDE_PATH=/var/run/current-system/sw/include and other vars to make
./configure && make work.

But have I got a guarantee that my X server uses the same libX11 library as
I have now in my profile? Does nix-env understand that I need only one
instance of libX11 package instead of one implicitly installed by installCD
and another one explicitly listed in configure.nix?

Sergey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20120103/3e2e6347/attachment-0001.html 


More information about the nix-dev mailing list