From c0d4a9f3ecb329e2711b5fd243e8637fd07275d5 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 9 Nov 2018 20:44:30 +0000 Subject: Add patchwork-fdo package --- gnu/packages/patchutils.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) 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 @@ (define-module (gnu packages patchutils) #: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 @@ (define-module (gnu packages patchutils) #: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 @@ (define-public patchwork (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))))) -- cgit v1.2.3