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 ;;; Copyright © 2019 Ben Sturmfels <ben@sturm.com.au>
6 ;;; This program is free software: you can redistribute it and/or modify
7 ;;; it under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation, either version 3 of the License, or
9 ;;; (at your option) any later version.
11 ;;; This program is distributed in the hope that it will be useful,
12 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; ========================================
18 ;;; ... This file is also part of GNU MediaGoblin, but we're leaving it
19 ;;; under GPLv3 for easy merge back and forth between Guix proper. It
20 ;;; also borrows some code directly from Guix.
22 ;;; ========================================
24 ;;; With `guix environment' you can use guix as kind of a universal
25 ;;; virtualenv, except a universal virtualenv with magical time traveling
26 ;;; properties and also, not just for Python.
28 ;;; Ok, here's how to use this thing! First, install Guix.
30 ;;; guix environment -l guix-env.scm --pure
32 ;;; And the first time you use it:
33 ;;; git submodule init
34 ;;; git submodule update
36 ;;; ./configure --with-python3 --without-virtualenv
38 ;;; python3 -m venv . && bin/python setup.py develop --no-deps
40 ;;; ... wait whaaat, what's that last line! I thought you said this
41 ;;; was a reasonable virtualenv replacement! Well it is and it will
42 ;;; be, but there's a catch, and the catch is that Guix doesn't know
43 ;;; about this directory and "setup.py dist" is technically necessary
44 ;;; for certain things to run, so we have a virtualenv with nothing
45 ;;; in it but this project itself.
47 ;;; The devtools/update_extlib.sh script won't run on Guix due to missing
48 ;;; "/usr/bin/env", so then run:
49 ;; node node_modules/.bin/bower install
51 ;;; bin/gmg adduser --username admin --password a --email admin@example.com
54 ;;; So anyway, now you can do:
55 ;;; PYTHONPATH="${PYTHONPATH}:$(pwd)" ./runtests.sh
57 ;;; Now notably this is goofier looking than running a virtualenv,
58 ;;; but soon I'll do something truly evil (I hope) that will make
59 ;;; the virtualenv and path-hacking stuff unnecessary.
64 ;;; - currently fails to upload h264 source video: "GStreamer: missing H.264 decoder"
66 (use-modules (ice-9 match)
72 (guix build-system gnu)
73 (guix build-system python)
75 (gnu packages autotools)
79 (gnu packages databases)
81 (gnu packages python-crypto)
82 (gnu packages python-web)
83 (gnu packages python-xyz)
85 (gnu packages gstreamer)
90 (gnu packages version-control)
91 ((guix licenses) #:select (expat zlib) #:prefix license:))
93 ;; =================================================================
94 ;; These packages are on their way into Guix proper but haven't made
95 ;; it in yet... or they're old versions of packages we're pinning
97 ;; =================================================================
99 (define python-pytest-forked
101 (name "python-pytest-forked")
106 (uri (pypi-uri "pytest-forked" version))
109 "0f4y1jhcg70xhm220pdb8r24n01knhn749aqlr14vmgbsb7allnk"))))
110 (build-system python-build-system)
112 `(("python-pytest" ,python-pytest)
113 ("python-setuptools-scm" ,python-setuptools-scm)))
115 "https://github.com/pytest-dev/pytest-forked")
117 "run tests in isolated forked subprocesses")
119 "run tests in isolated forked subprocesses")
120 (license license:expat)))
122 ;; =================================================================
131 (uri (pypi-uri "mediagoblin" version))
134 "0p2gj4z351166d1zqmmd8wc9bzb69w0fjm8qq1fs8dw2yhcg2wwv"))))
135 (build-system python-build-system)
137 ;; Complains about missing gunicorn. Not sure where that comes from.
140 `(("python-pytest" ,python-pytest)
141 ("nss-certs" ,nss-certs)))
143 `(("python-alembic" ,python-alembic)
144 ("python-pytest-xdist" ,python-pytest-xdist)
145 ("python-pytest-forked" ,python-pytest-forked)
146 ("python-celery" ,python-celery)
147 ("python-kombu" ,python-kombu)
148 ("python-webtest" ,python-webtest)
149 ("python-pastedeploy" ,python-pastedeploy)
150 ("python-paste" ,python-paste)
151 ("python-pastescript" ,python-pastescript)
152 ("python-translitcodec" ,python-translitcodec)
153 ("python-babel" ,python-babel)
154 ("python-configobj" ,python-configobj)
155 ("python-dateutil" ,python-dateutil)
156 ("python-itsdangerous" ,python-itsdangerous)
157 ("python-jinja2" ,python-jinja2)
158 ("python-jsonschema" ,python-jsonschema)
159 ("python-lxml" ,python-lxml)
160 ("python-markdown" ,python-markdown)
161 ("python-oauthlib" ,python-oauthlib)
162 ("python-pillow" ,python-pillow)
163 ("python-py-bcrypt" ,python-py-bcrypt)
164 ("python-pyld" ,python-pyld)
165 ("python-pytz" ,python-pytz)
166 ("python-requests" ,python-requests)
167 ("python-setuptools" ,python-setuptools)
168 ("python-six" ,python-six)
169 ("python-sphinx" ,python-sphinx)
170 ("python-docutils" ,python-docutils)
171 ("python-sqlalchemy" ,python-sqlalchemy)
172 ("python-unidecode" ,python-unidecode)
173 ("python-werkzeug" ,python-werkzeug)
174 ("python-exif-read" ,python-exif-read)
175 ("python-wtforms" ,python-wtforms)))
176 (home-page "http://mediagoblin.org/")
177 (synopsis "Web application for media publishing")
178 (description "MediaGoblin is a web application for publishing all kinds of
183 (inherit mediagoblin)
184 (name "mediagoblin-hackenv")
187 `(;;; audio/video stuff
188 ("gstreamer" ,gstreamer)
189 ("gst-plugins-base" ,gst-plugins-base)
190 ("gst-plugins-good" ,gst-plugins-good)
191 ("gst-plugins-ugly" ,gst-plugins-ugly)
192 ("gobject-introspection" ,gobject-introspection)
194 ("coreutils" ,coreutils)
195 ;; used by runtests.sh!
198 ("automake" ,automake)
199 ("autoconf" ,autoconf)
200 ,@(package-inputs mediagoblin)))
203 ("python-virtualenv" ,python-virtualenv)
204 ("python-pygobject" ,python-pygobject)
205 ("python-gst" ,python-gst)
206 ;; Needs python-gst in order for all tests to pass
207 ("python-numpy" ,python-numpy) ; this pulls in texlive...
208 ; and texlive-texmf is very large...
209 ("python-chardet", python-chardet)
210 ("python-psycopg2" ,python-psycopg2)
215 ,@(package-propagated-inputs mediagoblin))))