diff mbox series

[bug#55474,v3,14/17] gnu: Add python-django-permissionedforms.

Message ID 20230417145337.12403-14-ngraves@ngraves.fr
State New
Headers show
Series [bug#55474,v3,01/17] gnu: python-django-taggit: Update to 3.1.0. | expand

Commit Message

Nicolas Graves April 17, 2023, 2:53 p.m. UTC
* gnu/packages/django.scm (python-django-permissionedforms): New variable.
---
 gnu/packages/django.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 02897b02d7..6bd4f5d578 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -787,6 +787,40 @@  (define-public python-dj-database-url
 conn_max_age argument to easily enable Django’s connection pool.")
     (license license:bsd-2)))
 
+(define-public python-django-permissionedforms
+  (package
+    (name "python-django-permissionedforms")
+    (version "0.1")
+    ;; tests are not packaged in pypi
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/wagtail/django-permissionedforms")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0dscl238yi4xyd4nz2cxr5kikyalqj5drmk935llal3rd0dcy30d"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? inputs #:allow-other-keys)
+             (if tests?
+                 (invoke "python" "runtests.py")
+                 (format #t "test suite not run~%")))))))
+    (propagated-inputs (list python-django))
+    (native-inputs (list python-django-modelcluster))
+    (home-page "https://github.com/wagtail/django-permissionedforms")
+    (synopsis
+     "Create forms that vary according to user permissions in Django")
+    (description
+     "This package provides a Django extension for creating forms that vary
+according to user permissions.")
+    (license license:bsd-3)))
+
 (define-public python-django-picklefield
   (package
     (name "python-django-picklefield")