diff options
author | Christopher Baines <mail@cbaines.net> | 2018-11-09 20:44:30 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-07-05 07:54:04 +0100 |
commit | f29d6d9742f34f734a9bf52fc22821da6b4ead05 (patch) | |
tree | 7a9b0511bb98e970b148a2f22c3a0d71cd124d1b | |
parent | e773be4a03f68d1b99996fd96793635949d8a7a1 (diff) | |
download | guix-f29d6d9742f34f734a9bf52fc22821da6b4ead05.tar guix-f29d6d9742f34f734a9bf52fc22821da6b4ead05.tar.gz |
Add patchwork-fdo package
-rw-r--r-- | gnu/packages/patchutils.scm | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm index a63d889cff..1acc48d6f4 100644 --- a/gnu/packages/patchutils.scm +++ b/gnu/packages/patchutils.scm @@ -24,6 +24,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) @@ -46,6 +47,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)) @@ -467,3 +469,64 @@ patches, and displays the patches along with comments and state information. Users can login allowing them to change the state of patches.") (home-page "http://jk.ozlabs.org/projects/patchwork/") (license gpl2+))) + +(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-before 'replace-wsgi.py 'touch-wsgi.py + (lambda _ + (call-with-output-file "patchwork/wsgi.py" + (lambda (port) + (display "" port))) + #t)) + (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))))) |