guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: QtCreator Packaging


From: Thorsten Wilms
Subject: Re: QtCreator Packaging
Date: Thu, 11 Oct 2018 10:41:42 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]