From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thorsten Wilms Subject: Re: QtCreator Packaging Date: Thu, 11 Oct 2018 10:41:42 +0200 Message-ID: References: <871s8xxk8y.fsf@posteo.net> Reply-To: t_w_@freenet.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42984) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gAWZl-0003kp-K9 for guix-devel@gnu.org; Thu, 11 Oct 2018 04:44:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gAWZh-0005UJ-E5 for guix-devel@gnu.org; Thu, 11 Oct 2018 04:44:09 -0400 Received: from mout1.freenet.de ([2001:748:100:40::2:3]:38434) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gAWZh-0005T7-6S for guix-devel@gnu.org; Thu, 11 Oct 2018 04:44:05 -0400 Received: from [195.4.92.165] (helo=mjail2.freenet.de) by mout1.freenet.de with esmtpa (ID t_w_@freenet.de) (port 25) (Exim 4.90_1 #2) id 1gAWZe-00075s-Ku for guix-devel@gnu.org; Thu, 11 Oct 2018 10:44:02 +0200 Received: from [::1] (port=39416 helo=mjail2.freenet.de) by mjail2.freenet.de with esmtpa (ID t_w_@freenet.de) (Exim 4.90_1 #2) id 1gAWZe-0006Hh-K6 for guix-devel@gnu.org; Thu, 11 Oct 2018 10:44:02 +0200 Received: from sub7.freenet.de ([195.4.92.126]:33984) by mjail2.freenet.de with esmtpa (ID t_w_@freenet.de) (Exim 4.90_1 #2) id 1gAWXR-0004KQ-4m for guix-devel@gnu.org; Thu, 11 Oct 2018 10:41:45 +0200 Received: from p200300e4f3d242005d0bd8545a9c8f2d.dip0.t-ipconnect.de ([2003:e4:f3d2:4200:5d0b:d854:5a9c:8f2d]:47924) by sub7.freenet.de with esmtpsa (ID t_w_@freenet.de) (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256) (port 465) (Exim 4.90_1 #2) id 1gAWXP-0005eS-0x for guix-devel@gnu.org; Thu, 11 Oct 2018 10:41:45 +0200 In-Reply-To: <871s8xxk8y.fsf@posteo.net> Content-Language: en-US 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@gnu.org On 2018-10-11 04:58, Brett Gilio wrote: > I am beginning my attempt to package QtCreator. > Here is the current package definition: > http://ix.io/1oTH > > Here is the kill ring for the build: > http://ix.io/1oTJ Hi, I'm rather ... new to this myself. That said, the critical line seems to be: /gnu/store/rbrandv7anzjxqkr40d7fkanzssslk4b-bash-minimal-4.4.19/bin/bash: ./configure: No such file or directory Looking at https://wiki.qt.io/Building_Qt_Creator_from_Git, qmake is used instead of a ./configure. Here I thought `(build-system gnu-build-system)` would be the wrong choice, but https://www.gnu.org/software/guix/manual/en/html_node/Build-Systems.html doesn't mention qmake or anything that strikes me as Qt-specific. In the guix source tree, /gnu/packages: `grep -B 10 -A 10 qmake *` lists some candidates with context to look at. A full package definition picked out from there: --- (define-public ghostwriter (package (name "ghostwriter") (version "1.6.2") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/wereturtle/ghostwriter.git") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0251563zy0q69fzfacvalpx43y15cshb0bhshyd4w37061gh1c12")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("qttools" ,qttools))) ;for lrelease (inputs `(("hunspell" ,hunspell) ("qtbase" ,qtbase) ("qtmultimedia" ,qtmultimedia) ("qtsvg" ,qtsvg) ("qtwebkit" ,qtwebkit))) (arguments `(#:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (invoke "qmake" (string-append "PREFIX=" out))))) (add-after 'configure 'create-translations (lambda _ ;; `lrelease` will not overwrite, so delete existing .qm files (for-each delete-file (find-files "translations" ".*\\.qm")) (apply invoke "lrelease" (find-files "translations" ".*\\.ts")))) ;; Ensure that icons are found at runtime. (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (wrap-program (string-append out "/bin/ghostwriter") `("QT_PLUGIN_PATH" ":" prefix ,(map (lambda (label) (string-append (assoc-ref inputs label) "/lib/qt5/plugins/")) '("qtsvg" "qtmultimedia")))))))))) (home-page "https://wereturtle.github.io/ghostwriter/") (synopsis "Write without distractions") (description "@code{ghostwriter} provides a relaxing, distraction-free writing environment with Markdown markup.") (license license:gpl3+))) ;icons/* under CC-BY-SA3 --- So the current pattern for building with qmake is to use `(build-system gnu-build-system)` with modify-phases to replace configure. How that replacement looks exactly varies between packages. I'm surprised that python-pyqt has (native-inputs `(("qtbase" ,qtbase))) ; for qmake but other packages that replace configure do not. -- Thorsten Wilms thorwil's design for free software: http://thorwil.wordpress.com/