From afd83de0879f43f82e9f0765b710cc12808a7e1e Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 14 Jan 2021 23:32:27 -0500 Subject: gnu: Add appstream. * gnu/packages/freedesktop.scm (appstream): New variable. Signed-off-by: Leo Prikler --- gnu/packages/freedesktop.scm | 98 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) (limited to 'gnu/packages/freedesktop.scm') diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index e00454f7b3..e5f9ea71b6 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -58,8 +58,10 @@ #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cryptsetup) + #:use-module (gnu packages databases) #:use-module (gnu packages disk) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) @@ -75,6 +77,7 @@ #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages image) + #:use-module (gnu packages language) #:use-module (gnu packages libffi) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) @@ -101,6 +104,101 @@ #:use-module (gnu packages xorg) #:use-module (srfi srfi-1)) +(define-public appstream + (package + (name "appstream") + (version "0.13.1") + (source + (origin + (method url-fetch) + (uri + (string-append "https://www.freedesktop.org/software/" + "appstream/releases/" + "AppStream-" version ".tar.xz")) + (sha256 + (base32 "09l6ixz1w29pi0nb0flz14m4r3f2hpqpp1fq8y66v9xa4c9fczds")))) + (build-system meson-build-system) + (arguments + `(#:glib-or-gtk? #t + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-libstemmer + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "meson.build" + (("/usr/include") + (string-append (assoc-ref inputs "libstemmer") + "/include"))) + #t)) + (add-after 'patch-libstemmer 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs/api" + (substitute* "appstream-docs.xml" + (("http://www.oasis-open.org/docbook/xml/4.3/") + (string-append (assoc-ref inputs "docbook-xml-4.3") + "/xml/dtd/docbook/")))) + (for-each (lambda (file) + (substitute* file + (("http://www.oasis-open.org/docbook/xml/4.5/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + (find-files "scripts/desc" "\\.xml$")) + #t)) + (add-after 'patch-docbook-xml 'disable-failing-tests + (lambda _ + (substitute* "tests/test-pool.c" + (("[ \t]*g_test_add_func \\(\"/AppStream/PoolRead?.*;") + "") + (("[ \t]*g_test_add_func \\(\"/AppStream/PoolReadAsync?.*;") + "") + (("[ \t]*g_test_add_func \\(\"/AppStream/PoolEmpty?.*;") + "") + (("[ \t]*g_test_add_func \\(\"/AppStream/Cache?.*;") + "") + (("[ \t]*g_test_add_func \\(\"/AppStream/Merges?.*;") + "")) + #t)) + (add-after 'disable-failing-tests 'patch-install-dir + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "data/meson.build" + (("/etc") + (string-append (assoc-ref outputs "out") + "/etc"))) + #t))))) + (native-inputs + `(("cmake" ,cmake) + ("docbook-xml-4.3" ,docbook-xml-4.3) + ("docbook-xml" ,docbook-xml) + ("docbook-xsl" ,docbook-xsl) + ("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") + ("gobject-introspection" ,gobject-introspection) + ("gperf" ,gperf) + ("gtk-doc" ,gtk-doc) + ("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ("xsltproc" ,libxslt))) + (inputs + `(("libsoup" ,libsoup) + ("libstemmer" ,libstemmer) + ("libxml2" ,libxml2) + ("libyaml" ,libyaml) + ("lmdb" ,lmdb))) + (propagated-inputs + `(("glib" ,glib))) + (synopsis "Tools and libraries to work with AppStream metadata") + (description "AppStream is a cross-distribution effort for enhancing the way +we interact with the software repositories provided by distributions by +standardizing software component metadata. It provides the foundation to build +software-center applications, by providing metadata necessary for an +application-centric view on package repositories. It additionally provides +specifications for things like an unified software metadata database, screenshot +services and various other things needed to create user-friendly +application-centers for distributions.") + (home-page "https://www.freedesktop.org/wiki/Distributions/AppStream/") + ;; XXX: meson.build claims both, headers just indicate lgpl2.1+ + ;; there are also some (irrelevant) wtfpl2 examples + (license (list license:gpl2+ license:lgpl2.1+)))) + (define-public farstream (package (name "farstream") -- cgit v1.2.3 From 1a265842e634656411bc7304c4648273f174f65e Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 17 Mar 2021 03:42:12 -0400 Subject: gnu: Use PACKAGE/INHERIT in more places. * gnu/packages/algebra.scm (fftwf, fftw-openmpi), gnu/packages/audio.scm (ztoolkit-rsvg), gnu/packages/bioinformatics.scm (python2-dendropy), gnu/packages/boost.scm (boost-with-python2), gnu/packages/check.scm (python2-mock, python2-pytest-mock), gnu/packages/cups.scm (hplip-minimal), gnu/packages/freedesktop.scm (libinput-minimal), gnu/packages/gettext.scm (gnu-gettext), gnu/packages/glib.scm (python2-pygobject), gnu/packages/gnome.scm (gdl-minimal, libsoup-minimal, python2-pyatspi), gnu/packages/groff.scm (groff-minimal), gnu/packages/jami.scm (ffmpeg-jami), gnu/packages/libcanberra.scm (libcanberra/gtk+-2), gnu/packages/lirc.scm (python2-lirc), gnu/packages/llvm.scm (clang-runtime-3.5), gnu/packages/mpi.scm (java-openmpi, openmpi-thread-multiple), gnu/packages/node.scm (libnode), gnu/packages/onc-rpc.scm (libtirpc/hurd), gnu/packages/python-compression.scm (bitshuffle-for-snappy), gnu/packages/python-crypto.scm (python2-pycrypto, python2-cryptography) (python2-cryptography, python2-m2crypto), gnu/packages/python-web.scm (python2-html2text, python2-tornado) (python2-terminado, python2-ndg-httpsclient, python2-websocket-client) (python2-rauth, python2-url, python2-s3transfer), gnu/packages/python-xyz.scm (python2-psutil, python2-serpent) (python2-humanfriendly, python2-empy, python2-parse-type, python2-polib) (python2-jsonschema, python2-pystache, python2-cython, python2-numpydoc) (python2-ipyparallel, python2-traitlets, python2-dbus) (python2-beautifulsoup4, python2-pep517, python2-flake8, python2-llfuse) (python2-tlsh, python-file, python2-notebook, python-jupyter-console-minimal) (python2-contextlib2, python2-promise, python2-anyjson, python2-amqp) (python2-kombu, python2-billiard, python2-celery, python2-whoosh) (python2-jellyfish, python-rope, ptpython-2, python2-binaryornot) (python2-setproctitle, python2-argcomplete, python2-xopen, python2-isort) (python2-radon, python2-rfc6555, python2-activepapers, python2-send2trash) (python2-cloudpickle, python2-reparser), gnu/packages/python.scm (python2-called-python), gnu/packages/qt.scm (python2-sip, python-pyqt-without-qtwebkit, python2-pyqt) (python-qscintilla, python-pyqt+qscintilla), gnu/packages/scanner.scm (sane-backends), gnu/packages/sdl.scm (guile3.0-sdl2), gnu/packages/selinux.scm (checkpolicy, libselinux, libsemanage, secilc) (python-sepolgen, policycoreutils), gnu/packages/serialization.scm (lua5.1-libmpack, lua5.2-libmpack), gnu/packages/simulation.scm (fenics), gnu/packages/statistics.scm (python2-statsmodels), gnu/packages/texinfo.scm (info-reader), gnu/packages/wxwidgets.scm (wxwidgets-gtk2, wxwidgets-gtk2-3.1), gnu/packages/xml.scm (xmlsec-nss), gnu/packages/xorg.scm (uim-gtk, uim-qt), guix/build-system/python.scm (package-with-explicit-python) (strip-python2-variant): Use PACKAGE/INHERIT. --- gnu/packages/algebra.scm | 4 +- gnu/packages/audio.scm | 3 +- gnu/packages/bioinformatics.scm | 3 +- gnu/packages/boost.scm | 3 +- gnu/packages/check.scm | 4 +- gnu/packages/cups.scm | 3 +- gnu/packages/freedesktop.scm | 2 +- gnu/packages/gettext.scm | 3 +- gnu/packages/glib.scm | 51 ++++++------ gnu/packages/gnome.scm | 9 +- gnu/packages/groff.scm | 3 +- gnu/packages/jami.scm | 3 +- gnu/packages/libcanberra.scm | 2 +- gnu/packages/lirc.scm | 3 +- gnu/packages/llvm.scm | 3 +- gnu/packages/mpi.scm | 5 +- gnu/packages/node.scm | 3 +- gnu/packages/onc-rpc.scm | 8 +- gnu/packages/python-compression.scm | 3 +- gnu/packages/python-crypto.scm | 6 +- gnu/packages/python-web.scm | 20 ++--- gnu/packages/python-xyz.scm | 162 +++++++++++++++--------------------- gnu/packages/python.scm | 3 +- gnu/packages/qt.scm | 10 +-- gnu/packages/scanner.scm | 3 +- gnu/packages/sdl.scm | 3 +- gnu/packages/selinux.scm | 12 +-- gnu/packages/serialization.scm | 4 +- gnu/packages/simulation.scm | 2 +- gnu/packages/statistics.scm | 2 +- gnu/packages/texinfo.scm | 3 +- gnu/packages/wxwidgets.scm | 4 +- gnu/packages/xml.scm | 3 +- gnu/packages/xorg.scm | 6 +- guix/build-system/python.scm | 6 +- 35 files changed, 158 insertions(+), 209 deletions(-) (limited to 'gnu/packages/freedesktop.scm') diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index d2caa13d0e..129d922751 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -794,7 +794,7 @@ cosine/ sine transforms or DCT/DST).") (license license:gpl2+))) (define-public fftwf - (package (inherit fftw) + (package/inherit fftw (name "fftwf") (arguments (substitute-keyword-arguments (package-arguments fftw) @@ -812,7 +812,7 @@ cosine/ sine transforms or DCT/DST).") " Single-precision version.")))) (define-public fftw-openmpi - (package (inherit fftw) + (package/inherit fftw (name "fftw-openmpi") (inputs `(("openmpi" ,openmpi) diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 67a3e57dd9..8b23f04fe5 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -4918,8 +4918,7 @@ edited, converted, compressed and saved.") (license license:lgpl2.1))) (define-public ztoolkit-rsvg - (package - (inherit ztoolkit) + (package/inherit ztoolkit (name "ztoolkit-rsvg") (arguments `(#:configure-flags `("-Denable_rsvg=true"))) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 90e81354a5..eb466868d1 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2744,8 +2744,7 @@ trees (phylogenies) and characters.") (define-public python2-dendropy (let ((base (package-with-python2 python-dendropy))) - (package - (inherit base) + (package/inherit base (arguments `(#:phases (modify-phases %standard-phases diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm index b1ab8a4ec9..1323e28278 100644 --- a/gnu/packages/boost.scm +++ b/gnu/packages/boost.scm @@ -200,8 +200,7 @@ across a broad spectrum of applications.") "Some components have other similar licences.")))) (define-public boost-with-python2 - (package - (inherit boost) + (package/inherit boost (name "boost-python2") (native-inputs `(("python" ,python-2) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index cfda247d67..21514d1bc4 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -836,7 +836,7 @@ have been used.") (define-public python2-mock (let ((base (package-with-python2 (strip-python2-variant python-mock)))) - (package (inherit base) + (package/inherit base (propagated-inputs `(("python2-functools32" ,python2-functools32) ("python2-funcsigs" ,python2-funcsigs) @@ -1240,7 +1240,7 @@ same arguments.") (define-public python2-pytest-mock (let ((base (package-with-python2 (strip-python2-variant python-pytest-mock)))) - (package (inherit base) + (package/inherit base (propagated-inputs `(("python2-mock" ,python2-mock) ,@(package-propagated-inputs base)))))) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 2edd5d245c..b18273109e 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -676,8 +676,7 @@ should only be used as part of the Guix cups-pk-helper service.") ("pkg-config" ,pkg-config))))) (define-public hplip-minimal - (package - (inherit hplip) + (package/inherit hplip (name "hplip-minimal") (arguments (substitute-keyword-arguments (package-arguments hplip) diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index e5f9ea71b6..4105dd7ca0 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -508,7 +508,7 @@ other applications that need to directly deal with input devices.") (license license:x11))) (define-public libinput-minimal - (package (inherit libinput) + (package/inherit libinput (name "libinput-minimal") (inputs (fold alist-delete (package-inputs libinput) diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index bee33f2685..21228694d7 100644 --- a/gnu/packages/gettext.scm +++ b/gnu/packages/gettext.scm @@ -139,8 +139,7 @@ translated messages from the catalogs. Nearly all GNU packages use Gettext.") ;; module when there's a #:renamer, and that module may be empty at that point ;; in case or circular dependencies. (define-public gnu-gettext - (package - (inherit gettext-minimal) + (package/inherit gettext-minimal (name "gettext") (arguments (substitute-keyword-arguments (package-arguments gettext-minimal) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 1b9cd71785..5f710a4a38 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -833,32 +833,33 @@ useful for C++.") (properties `((python2-variant . ,(delay python2-pygobject)))))) (define-public python2-pygobject - (package (inherit (strip-python2-variant python-pygobject)) - (name "python2-pygobject") + (let ((base (strip-python2-variant python-pygobject))) + (package/inherit base + (name "python2-pygobject") - ;; Note: We use python-build-system here, because Meson only supports - ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it - ;; difficult to use for Python 2 projects. - (build-system python-build-system) - (arguments - `(#:python ,python-2 - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-broken-tests - (lambda _ - ;; FIXME: this test freezes and times out. - (delete-file "tests/test_mainloop.py") - ;; FIXME: this test fails with this kind of error: - ;; AssertionError: != !=