diff options
author | Christopher Baines <mail@cbaines.net> | 2018-11-09 20:44:30 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-03-01 07:12:10 +0000 |
commit | c0d4a9f3ecb329e2711b5fd243e8637fd07275d5 (patch) | |
tree | e74211fcc6bdd5b976cc9369348e63762d647ecf | |
parent | 3ea976669afb2e93941157db6f209ae3915feee6 (diff) | |
download | guix-c0d4a9f3ecb329e2711b5fd243e8637fd07275d5.tar guix-c0d4a9f3ecb329e2711b5fd243e8637fd07275d5.tar.gz |
Add patchwork-fdo package
-rw-r--r-- | gnu/packages/patchutils.scm | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index 8766c73e23..212249e49d 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -23,6 +23,7 @@ #:use-module (guix packages) #:use-module (guix licenses) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) @@ -45,6 +46,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages python-web) #:use-module (gnu packages version-control) #:use-module (gnu packages xml)) @@ -442,3 +444,58 @@ if __name__ == \"__main__\": (description "") (home-page "") (license ""))) + +(define-public patchwork-fdo + (package + (inherit patchwork) + (name "patchwork-fdo") + (version "1-git") + (source (origin + (method git-fetch) + (uri (git-reference + (url (string-append + "https://gitlab.freedesktop.org/patchwork-fdo/" + "patchwork-fdo.git")) + (commit "1decf84c8169298a09bbb8f680ec9c0ae9f0b888"))) + (sha256 + (base32 + "1fcrk3pfqjlzqs9wkm6d6xcjaydz211xbbm90djax5m3cixxjmf3")) + (patches + (list (origin + (method url-fetch) + (uri (string-append + "https://github.com/getpatchwork/patchwork/commit/" + "0bcb1bf6466461043bcb84c4856166105d5d5738.patch")) + (sha256 + (base32 + "1vy447kbx76g8hm7ngrbkh783izdc5p5a03gzix4p4y3shcjwhw3"))))) + (file-name (string-append name "-" version "-checkout")))) + (arguments + (substitute-keyword-arguments (package-arguments patchwork) + ((#:phases phases) + `(modify-phases ,phases + (delete 'install-hasher) + (add-after 'unpack 'patch-api.py + (lambda _ + (substitute* "patchwork/views/api.py" + (("filters\\.DjangoFilterBackend") + "django_filters.rest_framework.DjangoFilterBackend")))) + (add-after 'unpack 'patch-parser.py + (lambda _ + (substitute* "patchwork/parser.py" + (("\\.decode\\('utf-8'\\)") + "")))) + (add-after 'install 'install-parser + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (chmod (string-append (site-packages inputs outputs) + "/patchwork/parser.py") + #o555) + (symlink (string-append (site-packages inputs outputs) + "/patchwork/parser.py") + (string-append out "/bin/parser"))))))))) + (propagated-inputs + `(,@(package-propagated-inputs patchwork) + ("python-drf-nested-routers" ,python-drf-nested-routers) + ("python-django-jsonfield" ,python-django-jsonfield) + ("python-celery" ,python-celery))))) |