;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2020, 2021 Pierre Langlois ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2021 Stefan Reichör ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages gpodder) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages check) #:use-module (gnu packages curl) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) #:use-module (gnu packages gtk) #:use-module (gnu packages groff) #:use-module (gnu packages mp3) #:use-module (gnu packages music) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) #:use-module (gnu packages video) #:use-module (gnu packages xml)) (define-public gpodder (package (name "gpodder") (version "3.10.21") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/gpodder/gpodder") (commit version))) (sha256 (base32 "0n73jm5ypsj962gpr0dk10lqh83giqsczm63wchyhmrkyf1wgga1")) (file-name (git-file-name name version)) (patches (search-patches "gpodder-disable-updater.patch")))) (build-system python-build-system) (native-inputs (list intltool python-coverage python-minimock python-pytest python-pytest-cov python-pytest-httpserver which)) (inputs (list bash-minimal gtk+ python-pygobject python-pycairo python-requests python-dbus python-html5lib python-mutagen python-mygpoclient python-podcastparser youtube-dl xdg-utils)) (arguments '(#:phases (modify-phases %standard-phases ;; Avoid needing xdg-utils as a propagated input. (add-after 'unpack 'patch-xdg-open (lambda* (#:key inputs #:allow-other-keys) (let ((xdg-utils (assoc-ref inputs "xdg-utils"))) (substitute* "src/gpodder/util.py" (("xdg-open") (string-append xdg-utils "/bin/xdg-open"))) #t))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? (invoke "make" "unittest")))) ;; 'msgmerge' introduces non-determinism by resetting the ;; POT-Creation-Date in .po files. (add-before 'install 'do-not-run-msgmerge (lambda _ (substitute* "makefile" (("msgmerge") "true")) #t)) (add-before 'install 'make-po-files-writable (lambda _ (for-each (lambda (f) (chmod f #o664)) (find-files "po")) #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (setenv "PREFIX" (assoc-ref outputs "out")) (invoke "make" "install"))) (add-after 'install 'wrap-gpodder (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) (wrap-program (string-append out "/bin/gpodder") `("GI_TYPELIB_PATH" ":" prefix (,gi-ty