summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/patchutils.scm32
1 files changed, 24 insertions, 8 deletions
diff --git a/gnu/packages/patchutils.scm b/gnu/packages/patchutils.scm
index 540b85b41aa..2d17d9d57be 100644
--- a/gnu/packages/patchutils.scm
+++ b/gnu/packages/patchutils.scm
@@ -55,6 +55,7 @@
55 #:use-module (gnu packages less) 55 #:use-module (gnu packages less)
56 #:use-module (gnu packages mail) 56 #:use-module (gnu packages mail)
57 #:use-module (gnu packages text-editors) 57 #:use-module (gnu packages text-editors)
58 #:use-module (gnu packages time)
58 #:use-module (gnu packages ncurses) 59 #:use-module (gnu packages ncurses)
59 #:use-module (gnu packages ocaml) 60 #:use-module (gnu packages ocaml)
60 #:use-module (gnu packages package-management) 61 #:use-module (gnu packages package-management)
@@ -432,13 +433,20 @@ application = get_wsgi_application()\n") port)))))
432 (delete-file-recursively (string-append out-site-packages 433 (delete-file-recursively (string-append out-site-packages
433 "/patchwork/tests")) 434 "/patchwork/tests"))
434 435
436 (call-with-output-file
437 (string-append out-site-packages "/version.txt")
438 (lambda (port)
439 (display #$version port)
440 (newline port)))
441
435 ;; Install patchwork related tools 442 ;; Install patchwork related tools
436 (for-each (lambda (file) 443 (for-each
437 (install-file file 444 (lambda (file)
438 (string-append out "/bin"))) 445 (install-file file (string-append out "/bin")))
439 (list (string-append out-site-packages 446 (list
440 "/patchwork/bin/parsemail.sh") 447 (string-append out-site-packages
441 (string-append out-site-packages 448 "/patchwork/bin/parsemail.sh")
449 (string-append out-site-packages
442 "/patchwork/bin/parsemail-batch.sh"))) 450 "/patchwork/bin/parsemail-batch.sh")))
443 451
444 ;; Collect the static assets, this includes JavaScript, CSS and 452 ;; Collect the static assets, this includes JavaScript, CSS and
@@ -449,8 +457,15 @@ application = get_wsgi_application()\n") port)))))
449 ;; The intent here is that you can serve files from this 457 ;; The intent here is that you can serve files from this
450 ;; directory through a webserver, which is recommended when 458 ;; directory through a webserver, which is recommended when
451 ;; running Django applications. 459 ;; running Django applications.
452 (let ((static-root (string-append out 460 (let ((static-root
453 "/share/patchwork/htdocs"))) 461 (string-append out "/share/patchwork/htdocs")))
462 ;; Patch the STATICFILES_DIRS entry
463 (substitute* (string-append
464 out-site-packages
465 "/patchwork/settings/base.py")
466 (("os\\.path\\.join\\(ROOT\\_DIR, 'htdocs'\\)")
467 (string-append "'" static-root "'")))
468
454 (mkdir-p static-root) 469 (mkdir-p static-root)
455 (copy-file "patchwork/settings/production.example.py" 470 (copy-file "patchwork/settings/production.example.py"
456 "patchwork/settings/assets.py") 471 "patchwork/settings/assets.py")
@@ -496,6 +511,7 @@ if __name__ == \"__main__\":
496 (inputs (list python-wrapper)) 511 (inputs (list python-wrapper))
497 (propagated-inputs 512 (propagated-inputs
498 (list python-django 513 (list python-django
514 python-tzdata
499 ;; TODO: Make this configurable 515 ;; TODO: Make this configurable
500 python-psycopg2 516 python-psycopg2
501 python-mysqlclient 517 python-mysqlclient