summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aurox/packages/django.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/aurox/packages/django.scm b/aurox/packages/django.scm
new file mode 100644
index 0000000..ff141e2
--- /dev/null
+++ b/aurox/packages/django.scm
@@ -0,0 +1,53 @@
+(define-module (aurox packages django)
+ #:use-module (gnu packages)
+ #:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system pyproject)
+ #:use-module (guix gexp)
+ #:use-module (guix git-download)
+ #:use-module (guix packages))
+
+(define-public python-django-modeltrans
+ (package
+ (name "python-django-modeltrans")
+ (version "0.9.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zostera/django-modeltrans/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1ykd3b0c2qrbxv0w2lp5l7p8giy626gb7w21h65fikhbnvd0f22x"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs
+ (specifications->packages '("postgresql" "python-django" "python-psycopg")))
+ (native-inputs
+ (specifications->packages '("python-setuptools" "python-tzdata")))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (let ((pgdata "/tmp/pgdata")
+ (host "/tmp")
+ (port "5432")
+ (username "modeltrans")
+ (password "modeltrans")
+ (database "modeltrans"))
+ (invoke "initdb"
+ "--locale-provider=icu" "--icu-locale=en_US" pgdata)
+ (invoke "pg_ctl"
+ "-D" pgdata "-o" (string-append "-k " host) "start")
+ (invoke "createdb" "-h" host database)
+ (invoke "createuser" "-h" host username)
+ (invoke "psql" "-h" host "-d" database "-c"
+ (string-append "ALTER ROLE " username
+ " WITH SUPERUSER;"))
+ (invoke "python" "./manage.py" "test"))))))))
+ (home-page "https://github.com/zostera/django-modeltrans/")
+ (synopsis "Model translations in a jsonb field")
+ (description "Model translations in a jsonb field.")
+ (license license:bsd-3)))