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>
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.
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.
15 ;;; ========================================
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.
21 ;;; ========================================
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.
27 ;;; Ok, here's how to use this thing! First, install Guix.
29 ;;; guix environment -l guix-env.scm --pure
31 ;;; And the first time you use it:
33 ;;; ./configure --with-python3 --without-virtualenv
35 ;;; virtualenv . && ./bin/python setup.py develop --no-deps
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.
44 ;;; So anyway, now you can do:
45 ;;; PYTHONPATH="${PYTHONPATH}:$(pwd)" ./runtests.sh
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.
53 (use-modules (ice-9 match)
59 (guix build-system gnu)
60 (guix build-system python)
62 (gnu packages autotools)
65 (gnu packages gstreamer)
69 (gnu packages version-control)
70 ((guix licenses) #:select (expat zlib) #:prefix license:))
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
76 ;; =================================================================
78 (define python-sqlalchemy-0.9.10
80 (inherit python-sqlalchemy)
85 (uri (string-append "https://pypi.python.org/packages/source/S/"
86 "SQLAlchemy/SQLAlchemy-" version ".tar.gz"))
89 "0fqnssf7pxvc7dvd5l83vnqz2wfvpq7y01kcl1537f9nbqnvlp24"))))
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.
97 (define python-alembic-0.6.6
99 (inherit python-alembic)
104 (uri (pypi-uri "alembic" version))
107 "0i3nic56blq079vj1iskkmllwjp980vnvvx898d3bm5qa416crcn"))))
109 `(("python-nose" ,python-nose)
110 ,@(package-native-inputs python-alembic)))
112 `(("python-sqlalchemy" ,python-sqlalchemy-0.9.10)
113 ("python-mako" ,python-mako)
114 ("python-editor" ,python-editor)))))
116 ;; =================================================================
125 (uri (pypi-uri "mediagoblin" version))
128 "0p2gj4z351166d1zqmmd8wc9bzb69w0fjm8qq1fs8dw2yhcg2wwv"))))
129 (build-system python-build-system)
131 `(("python-pytest" ,python-pytest)))
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
172 (inherit mediagoblin)
173 (name "mediagoblin-hackenv")
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)
183 ("coreutils" ,coreutils)
184 ;; used by runtests.sh!
187 ("automake" ,automake)
188 ("autoconf" ,(autoconf-wrapper))
189 ,@(package-inputs mediagoblin)))
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)
204 ,@(package-propagated-inputs mediagoblin))))