all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 87649c965a986b8f8b6e17e9d88eda8a2762c1b9 10761 bytes (raw)
name: gnu/packages/mediagoblin.scm 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
 
;; Install with:
;;
;; ~/ws/guix/pre-inst-env guix environment --container --network --share=$HOME/.bash_history --ad-hoc mediagoblin
;;
;; Doesn't currently work when not in a container:
;;
;; ~/ws/guix/pre-inst-env guix environment --ad-hoc mediagoblin

(define-module (gnu packages mediagoblin)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-1)
  #:use-module (guix packages)
  #:use-module (guix licenses)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system python)
  #:use-module (gnu packages)
  #:use-module (gnu packages xiph)  ; flac for embedded libsndfile
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages certs)
  #:use-module (gnu packages check)
  #:use-module (gnu packages compression)  ; unzip for embedded python-wtforms
  #:use-module (gnu packages databases)
  #:use-module (gnu packages libffi)  ; cffi for embedded python-soundfile
  #:use-module (gnu packages openldap)
  #:use-module (gnu packages pdf)
  #:use-module (gnu packages pkg-config)  ; embedded libsndfile
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-crypto)
  #:use-module (gnu packages python-web)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages sphinx)
  #:use-module (gnu packages gstreamer)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages rsync)
  #:use-module (gnu packages ssh)
  #:use-module (gnu packages time)
  #:use-module (gnu packages video)
  #:use-module (gnu packages version-control)
  #:use-module (gnu packages xml)
  #:use-module ((guix licenses) #:select (bsd-3 gpl2+) #:prefix license:))

(define python-wtforms
  (package
    (name "python-wtforms")
    (version "2.3.3")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "WTForms" version))
       (sha256
        (base32
         ;; Interesting, if this has is that of a lower version, it blindly
         ;; ignores the version number above and you silently get the older
         ;; version.
         "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
    (build-system python-build-system)
    (arguments
     `(#:tests? #f))  ; TODO: Fix tests for upgraded version.
    (propagated-inputs
    `(("python-markupsafe" ,python-markupsafe)))
    (native-inputs
     `(("unzip" ,unzip)))  ; CHECK WHETHER NEEDED - not in `guix import` but is in old package.
    (home-page "http://wtforms.simplecodes.com/")
    (synopsis
     "Form validation and rendering library for Python web development")
    (description
     "WTForms is a flexible forms validation and rendering library
for Python web development.  It is very similar to the web form API
available in Django, but is a standalone package.")
    (license license:bsd-3)))


;; Copied from guix/gnu/packages/pulseaudio.scm in the core-updates branch which
;; adds flac/ogg/vorbis/opus support. This is required for building
;; python-soundfile (March 2021).
(define libsndfile
  (package
    (name "libsndfile")
    (version "1.0.30")
    (source (origin
             (method url-fetch)
             (uri (string-append "https://github.com/erikd/libsndfile"
                                 "/releases/download/v" version
                                 "/libsndfile-" version ".tar.bz2"))
             (sha256
              (base32
               "06k1wj3lwm7vf21s8yqy51k6nrkn9z610bj1gxb618ag5hq77wlx"))
             (modules '((ice-9 textual-ports) (guix build utils)))
             (snippet
              '(begin
                 ;; Remove carriage returns (CRLF) to prevent bogus
                 ;; errors from bash like "$'\r': command not found".
                 (let ((data (call-with-input-file
                                 "tests/pedantic-header-test.sh.in"
                               (lambda (port)
                                 (string-join
                                  (string-split (get-string-all port)
                                                #\return))))))
                   (call-with-output-file "tests/pedantic-header-test.sh.in"
                     (lambda (port) (format port data))))

                 ;; While at it, fix hard coded executable name.
                 (substitute* "tests/test_wrapper.sh.in"
                   (("^/usr/bin/env") "env"))
                 #t))))
    (build-system gnu-build-system)
    (propagated-inputs
     `(("flac" ,flac)
       ("libogg" ,libogg)
       ("libvorbis" ,libvorbis)
       ("opus" ,opus)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("python" ,python)))
    (home-page "http://www.mega-nerd.com/libsndfile/")
    (synopsis "Reading and writing files containing sampled sound")
    (description
     "Libsndfile is a C library for reading and writing files containing
sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through
one standard library interface.

It was designed to handle both little-endian (such as WAV) and
big-endian (such as AIFF) data, and to compile and run correctly on
little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well
as big-endian processor systems such as Motorola 68k, Power PC, MIPS and
SPARC.  Hopefully the design of the library will also make it easy to extend
for reading and writing new sound file formats.")
    (license license:gpl2+)))

;; Need soundfile for new Python 3 audio spectrograms. Can me merged into Guix
;; once core-updates is merged.
(define python-soundfile
  (package
    (name "python-soundfile")
    (version "0.10.3.post1")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "SoundFile" version))
       (sha256
        (base32
         "0yqhrfz7xkvqrwdxdx2ydy4h467sk7z3gf984y1x2cq7cm1gy329"))))
    (build-system python-build-system)
    (native-inputs
     `(("python-pytest" ,python-pytest)))
    (propagated-inputs
     `(("python-cffi" ,python-cffi)
       ("libsndfile" ,libsndfile)
       ("python-numpy" ,python-numpy)))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'build 'set-library-file-name
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((libsndfile (assoc-ref inputs "libsndfile")))
               (substitute* "soundfile.py"
                 (("_find_library\\('sndfile'\\)")
                  (string-append "'" libsndfile "/lib/libsndfile.so.1'")))
               #t))))))
    (home-page "https://github.com/bastibe/python-soundfile")
    (synopsis "An audio library based on libsndfile, CFFI and NumPy")
    (description
     "The soundfile module can read and write sound files, representing audio
data as NumPy arrays.")
    (license license:bsd-3)))

;; =================================================================

(define-public mediagoblin
  (package
    (name "mediagoblin")
    (version "0.12.0.dev")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://git.savannah.gnu.org/git/mediagoblin.git")
             (commit "3d72ccf4dfb106d8b9dcc5ac4cb754d6efa80649")))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0i6h8781nlnnqrw8jf0n0264p2fvc3z9rcp8vzv4a7aghiqmn2b2"))))
    (build-system python-build-system)
    (arguments
     `(
       #:tests? #f
       ;; #:phases (modify-phases %standard-phases
       ;;            (replace 'check
       ;;              (lambda _
       ;;                (setenv "PYTHONPATH"
       ;;                        (string-append (getcwd) ":"
       ;;                                       (getenv "PYTHONPATH")))
       ;;                ;; Translations needed for tests to pass. Probably
       ;;                ;; should be done during build stage?
       ;;                (invoke "./devtools/compile_translations.sh")
       ;;                (invoke "pytest" "./mediagoblin/tests" "-rs" "--boxed")
       ;;                #t)))
                ))
    (native-inputs
     `(("nss-certs" ,nss-certs)
       ("python-pytest" ,python-pytest)
       ("python-pytest-forked" ,python-pytest-forked)
       ("python-pytest-xdist" ,python-pytest-xdist)
       ("python-webtest" ,python-webtest)))
    ;; lle-bout suggests avoiding propagated-inputs and insteading creating
    ;; wrappers scripts. See:
    ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=47260#44
    (propagated-inputs
     `(("python-alembic" ,python-alembic)
       ("python-babel" ,python-babel)
       ("python-celery" ,python-celery)
       ("python-configobj" ,python-configobj)
       ("python-dateutil" ,python-dateutil)
       ("python-docutils" ,python-docutils)  ; What for?
       ("python-email-validator" ,python-email-validator)
       ("python-exif-read" ,python-exif-read)
       ("python-feedgenerator" ,python-feedgenerator)
       ("python-itsdangerous" ,python-itsdangerous)
       ("python-jinja2" ,python-jinja2)
       ("python-jsonschema" ,python-jsonschema)
       ("python-ldap" ,python-ldap)  ; For LDAP plugin
       ("python-lxml" ,python-lxml)
       ("python-markdown" ,python-markdown)
       ("python-oauthlib" ,python-oauthlib)
       ("python-openid" ,python-openid)  ; For OpenID plugin
       ("python-pastescript" ,python-pastescript)
       ("python-pillow" ,python-pillow)
       ("python-py-bcrypt" ,python-py-bcrypt)
       ("python-pyld" ,python-pyld)
       ("python-pytz" ,python-pytz)
       ("python-requests" ,python-requests)  ; For Persona plugin, batchaddmedia
       ("python-setuptools" ,python-setuptools)  ; What for?
       ("python-soundfile" ,python-soundfile)
       ("python-sphinx" ,python-sphinx)
       ("python-sqlalchemy" ,python-sqlalchemy)
       ("python-translitcodec" ,python-translitcodec)
       ("python-unidecode" ,python-unidecode)
       ("python-waitress" ,python-waitress)
       ("python-werkzeug" ,python-werkzeug)
       ("python-wtforms" ,python-wtforms)

       ;; Audio/video media
       ("gobject-introspection" ,gobject-introspection)
       ("gst-libav" ,gst-libav)
       ("gst-plugins-bad" ,gst-plugins-bad)
       ("gst-plugins-base" ,gst-plugins-base)
       ("gst-plugins-good" ,gst-plugins-good)
       ("gst-plugins-ugly" ,gst-plugins-ugly)
       ("gstreamer" ,gstreamer)
       ("openh264" ,openh264)
       ("python-gst" ,python-gst)  ; For tests to pass
       ("python-numpy" ,python-numpy)  ; Audio spectrograms
       ("python-pygobject" ,python-pygobject)

       ;; PDF media.
       ("poppler" ,poppler)

       ))
    (home-page "https://mediagoblin.org/")
    (synopsis "Web application for media publishing")
    (description "MediaGoblin is a web application for publishing all kinds of
media.")
    (license agpl3+)))

debug log:

solving 87649c965a ...
found 87649c965a in https://yhetil.org/guix/87wntfsjt7.fsf@sturm.com.au/

applying [1/1] https://yhetil.org/guix/87wntfsjt7.fsf@sturm.com.au/
diff --git a/gnu/packages/mediagoblin.scm b/gnu/packages/mediagoblin.scm
new file mode 100644
index 0000000000..87649c965a

Checking patch gnu/packages/mediagoblin.scm...
Applied patch gnu/packages/mediagoblin.scm cleanly.

index at:
100644 87649c965a986b8f8b6e17e9d88eda8a2762c1b9	gnu/packages/mediagoblin.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.