summary refs log tree commit diff
path: root/gnu/packages/django.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-07-21 12:29:56 +0300
committerEfraim Flashner <efraim@flashner.co.il>2020-07-21 15:30:08 +0300
commit4a82decd87f49e30c55c629a99ef483516042702 (patch)
treeabb7ecd85dd1100300313b2a1645ae550564e537 /gnu/packages/django.scm
parent63c3f15dc2ff51f87c23bf9c7fd0cb5d3b9c5569 (diff)
downloadguix-4a82decd87f49e30c55c629a99ef483516042702.tar.gz
gnu: Add python-django-haystack.
* gnu/packages/django.scm (python-django-haystack): New variable.
Diffstat (limited to 'gnu/packages/django.scm')
-rw-r--r--gnu/packages/django.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 56b00c8d9a..bb1f6a1981 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -32,6 +32,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages geo)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
@@ -281,6 +282,54 @@ useful tools for testing Django applications and projects.")
 (define-public python2-pytest-django
   (package-with-python2 python-pytest-django))
 
+(define-public python-django-haystack
+  (package
+    (name "python-django-haystack")
+    (version "2.8.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "django-haystack" version))
+        (sha256
+         (base32
+          "1302fqsrx8w474xk5cmnmg3hjqfprlxnjg9qlg86arsr4v4vqm4b"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'loosen-verion-restrictions
+           (lambda _
+             (substitute* "setup.py"
+               (("geopy.*") "geopy',\n"))
+             #t))
+         (add-before 'check 'set-gdal-lib-path
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "GDAL_LIBRARY_PATH"
+                     (string-append (assoc-ref inputs "gdal")
+                                    "/lib"))
+             #t)))
+       #:tests? #f)) ; OSError: libgdal.so.27: cannot open shared object file
+    (propagated-inputs
+     `(("python-django" ,python-django)))
+    (native-inputs
+     `(("gdal" ,gdal)
+       ("python-coverage" ,python-coverage)
+       ("python-dateutil" ,python-dateutil)
+       ("python-geopy" ,python-geopy)
+       ("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)
+       ("python-requests" ,python-requests)
+       ("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-pysolr" ,python-pysolr)
+       ("python-whoosh" ,python-whoosh)))
+    (home-page "http://haystacksearch.org/")
+    (synopsis "Pluggable search for Django")
+    (description "Haystack provides modular search for Django.  It features a
+unified, familiar API that allows you to plug in different search backends
+(such as Solr, Elasticsearch, Whoosh, Xapian, etc.) without having to modify
+your code.")
+    (license license:bsd-3)))
+
 (define-public python-django-filter
   (package
     (name "python-django-filter")