From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: Re: QtHaveModule Date: Tue, 9 Aug 2016 21:04:49 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCKg-0001iu-5V for guix-devel@gnu.org; Tue, 09 Aug 2016 15:04:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXCKc-00031p-1m for guix-devel@gnu.org; Tue, 09 Aug 2016 15:04:57 -0400 Received: from mail-yb0-x22b.google.com ([2607:f8b0:4002:c09::22b]:32973) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXCKa-00031P-QY for guix-devel@gnu.org; Tue, 09 Aug 2016 15:04:53 -0400 Received: by mail-yb0-x22b.google.com with SMTP id e125so7014218ybc.0 for ; Tue, 09 Aug 2016 12:04:50 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel , Andreas Enge Hi Andreas, > This makes me think that "qtHaveModule" does not work; and I wonder whether > in our other Qt modules that have Qt modules as input, these are actually > detected correctly. Well, I tried qtsensors, and did not notice this problem. Trying to package the missing qt modules I came to the same conclusion. I think that the qt modules that we have packaged all share one thing in common. They do not use the qtHaveModule macro. qtsensors for example does not [0]. > Nix should have the same problem; > they call a shell script "setup-hook.sh" that extends an environment variable > NIX_QT5_MODULES by the output path of each module. This is then used in a > complicated shell script setup-hook.sh of qtbase. I think that the magic happens in qt-env.nix [1], but I'm not sure. It looks like qt-env.nix takes all the qtInputs and turns it into what looks like a guix profile to me. Then it uses a qt.conf file to set the relevant paths. > cat >"$out/bin/qt.conf" < [Paths] > Prefix = $out > Plugins = lib/qt5/plugins > Imports = lib/qt5/imports > Qml2Imports = lib/qt5/qml > Documentation = share/doc/qt5 > EOF I am not sure what the best way to proceed is, since $out should be $GUIX_ENVIRONMENT, but $GUIX_ENVIRONMENT isn't known when we build qtbase. What I think needs to happen for QtHaveModule to work is we need to generate a qt.conf file when a guix environment is created that has qtbase as a dependency and make sure it's symlinked into the bin directory. [0] https://github.com/qt/qtsensors/blob/dev/qtsensors.pro [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/qt-5/qt-env.nix