[Nix-dev] how to build qt5 via nix-shell?

Ellis Whitehead ellis.whitehead at gmail.com
Mon Dec 1 22:40:40 CET 2014


Thanks Wout, that worked.

On Mon, Dec 1, 2014 at 10:10 PM, Wout Mertens <wout.mertens at gmail.com> wrote:
> Try adding --pure to the nix-shell invocation?
>
> On Mon, Dec 1, 2014, 20:33 Ellis Whitehead <ellis.whitehead at gmail.com>
> wrote:
>>
>> Could someone please enlighten me as to how to properly use nix-shell
>> to build qt5?
>>
>> I'm trying to create a patch for Qt that makes QSettings use
>> XDG_DATA_DIRS instead of hardcoded paths (with the ultimate goal of
>> getting lxqt into nixpkgs).  I have not been able to get the qt5
>> package to configure when using nix-shell, although it works fine with
>> ``nix-build ~/src/nixpkgs -A qt5``.  I try the following:
>>
>> ```
>> nix-shell ~/src/nixpkgs -A qt5
>> eval "$prePatch"
>> patchPhase
>> configurePhase
>> ```
>>
>> The configure phase aborts on this line, where the error is apparently
>> due to having an INCLUDE path to `dbus-tools` instead of `dbus-libs`:
>>
>> ```
>> g++ -c -pipe -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I.
>>
>> -I/nix/store/n8l5j8nxd85as0x5p9ghflngipbjim1p-dbus-tools-1.8.6/include/dbus-1.0
>>
>> -I/nix/store/n8l5j8nxd85as0x5p9ghflngipbjim1p-dbus-tools-1.8.6/lib/dbus-1.0/include
>> -o dbus.o dbus.cpp
>> dbus.cpp:43:23: fatal error: dbus/dbus.h: No such file or directory
>> ```
>>
>> With ``nix-build``, the corresponding line is as follows -- notice
>> that `dbus-libs` is used instead of `dbus-tools`:
>>
>> ```
>> g++ -c -pipe -O2 -Wall -W -fPIE  -I../../../mkspecs/linux-g++ -I.
>>
>> -I/nix/store/m2zwqdrbwmckn6yxa8xn8j30spvrikg5-dbus-libs-1.8.6/include/dbus-1.0
>>
>> -I/nix/store/m2zwqdrbwmckn6yxa8xn8j30spvrikg5-dbus-libs-1.8.6/lib/dbus-1.0/include
>> -o dbus.o dbus.cpp
>> ```
>>
>> Many thanks!
>> Ellis
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list