root/package.scm

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
;; guix package see https://gnu.org/s/guix
;; install with guix package -f package.scm
(use-modules (guix packages)
             ((guix licenses) #:renamer (symbol-prefix-proc 'license:))
             (guix build-system gnu)
             (gnu packages)
             (gnu packages gl)
             (gnu packages qt)
             (gnu packages curl)
             (gnu packages tls)
             (gnu packages freedesktop))

(define qhttpserver (load "src/libs/guix-qhttpserver.scm"))
(define noslib (load "src/libs/noslib/package.scm"))
(define libmpv (load "src/libs/guix-mpv.scm"))

(package
 (name "media-u")
 (version "0.1")
 (source ;; #f
         (origin
          (method url-fetch)
          (uri (string-append "https://hidamari.blue/git/media-u/release/media-u-"
                              version ".tar.gz"))
          (sha256
           (base32 "0gwmy67rzanbzyc9yaz115i4rsc6d0pvpg8syryk1fvpkki8ljg6"))))
 (build-system gnu-build-system)
 (arguments
  `(#:phases
    (modify-phases
     %standard-phases
     (replace
      'configure
      (lambda* (#:key inputs outputs #:allow-other-keys)
        (let* ((out (assoc-ref outputs "out")))
          (system* "qmake" "." "-r" "USE_MPV=1"
                   (string-append "PREFIX=" out)))))
     (replace
      'install
      (lambda* (#:key inputs outputs #:allow-other-keys)
        ;; avoid installing the test cases (qmake tries that by default)
        (chdir "src")
        (system* "make" "install"))))))
 (inputs
  `(("qt" ,qt)
    ("curl" ,curl)
    ("noslib" ,noslib)
    ("qhttpserver" ,qhttpserver)
    ("mpv" ,libmpv)
    ("gnutls" ,gnutls)))
 (propagated-inputs
  `(("ffmpeg" ,ffmpeg)
    ("xdg-utils" ,xdg-utils)))
 (search-paths
  ;; For HTTPS access, we need a single-file certificate bundle, specified
  ;; with $SSL_CERT_FILE
  ;; FIXME: This variable designates a single file; it is not a search path.
  (list (search-path-specification
         (variable "SSL_CERT_DIR")
         (files '("etc/ssl/certs/")))
        (search-path-specification
         (variable "SSL_CERT_FILE")
         (files '("etc/ssl/certs/ca-certificates.crt")))))

 (synopsis "anime playlist generator and watchlist sync")
 (description "Put your chinese cartons into this
 and stop remembering what episode number you watched last.")
 (home-page "https://hidamari.blue/git/media-u")
 (license license:gpl3))