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

Sergey Mironov ierton at gmail.com
Wed Jan 4 12:33:08 CET 2012


Let me reformulate my question: Let's say nixpkgs contains two packages,
package A depends on B (B may be some library). If I write

environment.systemPackages = [A];

what will nixos do for package B? Have I got a tool which will tell me that
B is installed but not exposed (linked to profile) or something like that?
Looks like nix-env knows nothing about system packages and the only way I
know so far to see B's presence is to type 'ldd A'.

Sergey

2012/1/3 Sergey Mironov <ierton at gmail.com>

> 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/20120104/2f196ce4/attachment.html 


More information about the nix-dev mailing list