Removing erronously installed print statement.
[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 version-control)
68 ((guix licenses) #:select (expat zlib) #:prefix license:))
69
70 ;; =================================================================
71 ;; These packages are on their way into Guix proper but haven't made
72 ;; it in yet... or they're old versions of packages we're pinning
73 ;; ourselves to...
74 ;; =================================================================
75
76 (define python-sqlalchemy-0.9.10
77 (package
78 (inherit python-sqlalchemy)
79 (version "0.9.10")
80 (source
81 (origin
82 (method url-fetch)
83 (uri (string-append "https://pypi.python.org/packages/source/S/"
84 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
85 (sha256
86 (base32
87 "0fqnssf7pxvc7dvd5l83vnqz2wfvpq7y01kcl1537f9nbqnvlp24"))))
88
89 ;; Temporarily skipping tests. It's the stuff that got fixed in
90 ;; the recent sqlalchemy release we struggled with on-list. The
91 ;; patch would have to be backported here to 0.9.10.
92 (arguments
93 '(#:tests? #f))))
94
95 (define python-alembic-0.6.6
96 (package
97 (inherit python-alembic)
98 (version "0.6.6")
99 (source
100 (origin
101 (method url-fetch)
102 (uri (pypi-uri "alembic" version))
103 (sha256
104 (base32
105 "0i3nic56blq079vj1iskkmllwjp980vnvvx898d3bm5qa416crcn"))))
106 (native-inputs
107 `(("python-nose" ,python-nose)
108 ,@(package-native-inputs python-alembic)))
109 (propagated-inputs
110 `(("python-sqlalchemy" ,python-sqlalchemy-0.9.10)
111 ("python-mako" ,python-mako)
112 ("python-editor" ,python-editor)))))
113
114 ;; =================================================================
115
116 (define mediagoblin
117 (package
118 (name "mediagoblin")
119 (version "0.8.1")
120 (source
121 (origin
122 (method url-fetch)
123 (uri (pypi-uri "mediagoblin" version))
124 (sha256
125 (base32
126 "0p2gj4z351166d1zqmmd8wc9bzb69w0fjm8qq1fs8dw2yhcg2wwv"))))
127 (build-system python-build-system)
128 (native-inputs
129 `(("python-pytest" ,python-pytest)))
130 (propagated-inputs
131 `(("python-alembic" ,python-alembic)
132 ("python-pytest-xdist" ,python-pytest-xdist)
133 ("python-celery" ,python-celery)
134 ("python-kombu" ,python-kombu)
135 ("python-webtest" ,python-webtest)
136 ("python-pastedeploy" ,python-pastedeploy)
137 ("python-paste" ,python-paste)
138 ("python-pastescript" ,python-pastescript)
139 ("python-translitcodec" ,python-translitcodec)
140 ("python-babel" ,python-babel)
141 ("python-configobj" ,python-configobj)
142 ("python-dateutil-2" ,python-dateutil-2)
143 ("python-itsdangerous" ,python-itsdangerous)
144 ("python-jinja2" ,python-jinja2)
145 ("python-jsonschema" ,python-jsonschema)
146 ("python-lxml" ,python-lxml)
147 ("python-markdown" ,python-markdown)
148 ("python-oauthlib" ,python-oauthlib)
149 ("python-pillow" ,python-pillow)
150 ("python-py-bcrypt" ,python-py-bcrypt)
151 ("python-pyld" ,python-pyld)
152 ("python-pytz" ,python-pytz)
153 ("python-requests" ,python-requests)
154 ("python-setuptools" ,python-setuptools)
155 ("python-six" ,python-six)
156 ("python-sphinx" ,python-sphinx)
157 ("python-docutils" ,python-docutils)
158 ("python-sqlalchemy" ,python-sqlalchemy)
159 ("python-unidecode" ,python-unidecode)
160 ("python-werkzeug" ,python-werkzeug)
161 ("python-exif-read" ,python-exif-read)
162 ("python-wtforms" ,python-wtforms)))
163 (home-page "http://mediagoblin.org/")
164 (synopsis "Web application for media publishing")
165 (description "MediaGoblin is a web application for publishing all kinds of
166 media.")
167 (license agpl3+)))
168
169 (package
170 (inherit mediagoblin)
171 (name "mediagoblin-hackenv")
172 (version "git")
173 (inputs
174 `(;;; audio/video stuff
175 ("gstreamer" ,gstreamer)
176 ("gst-plugins-base" ,gst-plugins-base)
177 ("gst-plugins-good" ,gst-plugins-good)
178 ("gst-plugins-ugly" ,gst-plugins-ugly)
179 ("gobject-introspection" ,gobject-introspection)
180 ;; useful to have!
181 ("coreutils" ,coreutils)
182 ;; used by runtests.sh!
183 ("which" ,which)
184 ("git" ,git)
185 ("automake" ,automake)
186 ("autoconf" ,(autoconf-wrapper))
187 ,@(package-inputs mediagoblin)))
188 (propagated-inputs
189 `(("python" ,python)
190 ("python-virtualenv" ,python-virtualenv)
191 ("python-pygobject" ,python-pygobject)
192 ("python-gst" ,python-gst)
193 ;; Needs python-gst in order for all tests to pass
194 ("python-numpy" ,python-numpy) ; this pulls in texlive...
195 ; and texlive-texmf is very large...
196 ("python-chardet", python-chardet)
197 ("python-psycopg2" ,python-psycopg2)
198 ,@(package-propagated-inputs mediagoblin))))