Cap kombu and celery
[mediagoblin.git] / guix-env.scm
1 ;;; GNU MediaGoblin -- federated, autonomous media hosting
2 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
3 ;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
4 ;;;
5 ;;; This program is free software: you can redistribute it and/or modify
6 ;;; it under the terms of the GNU General Public License as published by
7 ;;; the Free Software Foundation, either version 3 of the License, or
8 ;;; (at your option) any later version.
9 ;;;
10 ;;; This program is distributed in the hope that it will be useful,
11 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ;;; GNU General Public License for more details.
14 ;;;
15 ;;; ========================================
16 ;;;
17 ;;; ... This file is also part of GNU MediaGoblin, but we're leaving it
18 ;;; under GPLv3 for easy merge back and forth between Guix proper. It
19 ;;; also borrows some code directly from Guix.
20 ;;;
21 ;;; ========================================
22 ;;;
23 ;;; With `guix environment' you can use guix as kind of a universal
24 ;;; virtualenv, except a universal virtualenv with magical time traveling
25 ;;; properties and also, not just for Python.
26 ;;;
27 ;;; Ok, here's how to use this thing! First, install Guix.
28 ;;; Then do:
29 ;;; guix environment -l guix-env.scm --pure
30 ;;;
31 ;;; And the first time you use it:
32 ;;; ./bootstrap.sh
33 ;;; ./configure --with-python3 --without-virtualenv
34 ;;; make
35 ;;; virtualenv . && ./bin/python setup.py develop --no-deps
36 ;;;
37 ;;; ... wait whaaat, what's that last line! I thought you said this
38 ;;; was a reasonable virtualenv replacement! Well it is and it will
39 ;;; be, but there's a catch, and the catch is that Guix doesn't know
40 ;;; about this directory and "setup.py dist" is technically necessary
41 ;;; for certain things to run, so we have a virtualenv with nothing
42 ;;; in it but this project itself.
43 ;;;
44 ;;; So anyway, now you can do:
45 ;;; PYTHONPATH="${PYTHONPATH}:$(pwd)" ./runtests.sh
46 ;;;
47 ;;; Now notably this is goofier looking than running a virtualenv,
48 ;;; but soon I'll do something truly evil (I hope) that will make
49 ;;; the virtualenv and path-hacking stuff unnecessary.
50 ;;;
51 ;;; Have fun!
52
53 (use-modules (ice-9 match)
54 (srfi srfi-1)
55 (guix packages)
56 (guix licenses)
57 (guix download)
58 (guix git-download)
59 (guix build-system gnu)
60 (guix build-system python)
61 (gnu packages)
62 (gnu packages autotools)
63 (gnu packages base)
64 (gnu packages python)
65 (gnu packages gstreamer)
66 (gnu packages glib)
67 (gnu packages rsync)
68 (gnu packages ssh)
69 (gnu packages version-control)
70 ((guix licenses) #:select (expat zlib) #:prefix license:))
71
72 ;; =================================================================
73 ;; These packages are on their way into Guix proper but haven't made
74 ;; it in yet... or they're old versions of packages we're pinning
75 ;; ourselves to...
76 ;; =================================================================
77
78 (define python-sqlalchemy-0.9.10
79 (package
80 (inherit python-sqlalchemy)
81 (version "0.9.10")
82 (source
83 (origin
84 (method url-fetch)
85 (uri (string-append "https://pypi.python.org/packages/source/S/"
86 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
87 (sha256
88 (base32
89 "0fqnssf7pxvc7dvd5l83vnqz2wfvpq7y01kcl1537f9nbqnvlp24"))))
90
91 ;; Temporarily skipping tests. It's the stuff that got fixed in
92 ;; the recent sqlalchemy release we struggled with on-list. The
93 ;; patch would have to be backported here to 0.9.10.
94 (arguments
95 '(#:tests? #f))))
96
97 (define python-alembic-0.6.6
98 (package
99 (inherit python-alembic)
100 (version "0.6.6")
101 (source
102 (origin
103 (method url-fetch)
104 (uri (pypi-uri "alembic" version))
105 (sha256
106 (base32
107 "0i3nic56blq079vj1iskkmllwjp980vnvvx898d3bm5qa416crcn"))))
108 (native-inputs
109 `(("python-nose" ,python-nose)
110 ,@(package-native-inputs python-alembic)))
111 (propagated-inputs
112 `(("python-sqlalchemy" ,python-sqlalchemy-0.9.10)
113 ("python-mako" ,python-mako)
114 ("python-editor" ,python-editor)))))
115
116 ;; =================================================================
117
118 (define mediagoblin
119 (package
120 (name "mediagoblin")
121 (version "0.8.1")
122 (source
123 (origin
124 (method url-fetch)
125 (uri (pypi-uri "mediagoblin" version))
126 (sha256
127 (base32
128 "0p2gj4z351166d1zqmmd8wc9bzb69w0fjm8qq1fs8dw2yhcg2wwv"))))
129 (build-system python-build-system)
130 (native-inputs
131 `(("python-pytest" ,python-pytest)))
132 (propagated-inputs
133 `(("python-alembic" ,python-alembic)
134 ("python-pytest-xdist" ,python-pytest-xdist)
135 ("python-celery" ,python-celery)
136 ("python-kombu" ,python-kombu)
137 ("python-webtest" ,python-webtest)
138 ("python-pastedeploy" ,python-pastedeploy)
139 ("python-paste" ,python-paste)
140 ("python-pastescript" ,python-pastescript)
141 ("python-translitcodec" ,python-translitcodec)
142 ("python-babel" ,python-babel)
143 ("python-configobj" ,python-configobj)
144 ("python-dateutil-2" ,python-dateutil-2)
145 ("python-itsdangerous" ,python-itsdangerous)
146 ("python-jinja2" ,python-jinja2)
147 ("python-jsonschema" ,python-jsonschema)
148 ("python-lxml" ,python-lxml)
149 ("python-markdown" ,python-markdown)
150 ("python-oauthlib" ,python-oauthlib)
151 ("python-pillow" ,python-pillow)
152 ("python-py-bcrypt" ,python-py-bcrypt)
153 ("python-pyld" ,python-pyld)
154 ("python-pytz" ,python-pytz)
155 ("python-requests" ,python-requests)
156 ("python-setuptools" ,python-setuptools)
157 ("python-six" ,python-six)
158 ("python-sphinx" ,python-sphinx)
159 ("python-docutils" ,python-docutils)
160 ("python-sqlalchemy" ,python-sqlalchemy)
161 ("python-unidecode" ,python-unidecode)
162 ("python-werkzeug" ,python-werkzeug)
163 ("python-exif-read" ,python-exif-read)
164 ("python-wtforms" ,python-wtforms)))
165 (home-page "http://mediagoblin.org/")
166 (synopsis "Web application for media publishing")
167 (description "MediaGoblin is a web application for publishing all kinds of
168 media.")
169 (license agpl3+)))
170
171 (package
172 (inherit mediagoblin)
173 (name "mediagoblin-hackenv")
174 (version "git")
175 (inputs
176 `(;;; audio/video stuff
177 ("gstreamer" ,gstreamer)
178 ("gst-plugins-base" ,gst-plugins-base)
179 ("gst-plugins-good" ,gst-plugins-good)
180 ("gst-plugins-ugly" ,gst-plugins-ugly)
181 ("gobject-introspection" ,gobject-introspection)
182 ;; useful to have!
183 ("coreutils" ,coreutils)
184 ;; used by runtests.sh!
185 ("which" ,which)
186 ("git" ,git)
187 ("automake" ,automake)
188 ("autoconf" ,(autoconf-wrapper))
189 ,@(package-inputs mediagoblin)))
190 (propagated-inputs
191 `(("python" ,python)
192 ("python-virtualenv" ,python-virtualenv)
193 ("python-pygobject" ,python-pygobject)
194 ("python-gst" ,python-gst)
195 ;; Needs python-gst in order for all tests to pass
196 ("python-numpy" ,python-numpy) ; this pulls in texlive...
197 ; and texlive-texmf is very large...
198 ("python-chardet", python-chardet)
199 ("python-psycopg2" ,python-psycopg2)
200 ;; For developing
201 ("openssh" ,openssh)
202 ("git" ,git)
203 ("rsync" ,rsync)
204 ,@(package-propagated-inputs mediagoblin))))