aboutsummaryrefslogtreecommitdiff
path: root/crn/packages/erlang-xyz.scm
blob: 08f1fa8bae147f9deb95abbca3b3f1a7320c6892 (plain)
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
(define-module (crn packages erlang-xyz)
               #:use-module (gnu packages)
               #:use-module (gnu packages erlang)
               #:use-module (gnu packages erlang-xyz)
               #:use-module (guix build-system rebar)
               #:use-module (guix download)
               #:use-module (guix git-download)
               #:use-module ((guix licenses) #:prefix license:)
               #:use-module (guix gexp)
               #:use-module (guix packages)
               #:use-module (guix utils))

(define-public reading-heap
  (package
    (name "reading-heap")
    (version "0.1.2")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference
               (url "https://codeberg.org/languidnights/reading_heap")
               (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
          (base32 "1inn3sgk0c9wavpslf1qk0xlsf8zqp67azlq544x1i48mpmbdsh1"))))
    (build-system rebar-build-system)
    (inputs (list erlang-cowboy erlang-ranch erlang-cowlib))
    (arguments
      (list
        #:phases
        #~(modify-phases 
            %standard-phases
            (add-after 'unpack 'set-environment
                       (lambda* (#:key inputs #:allow-other-keys)
                         (let ((ranch (assoc-ref inputs "erlang-ranch"))
                               (cowboy (assoc-ref inputs "erlang-cowboy"))
                               (cowlib (assoc-ref inputs "erlang-cowlib")))
                           (setenv "ERL_LIBS" (string-append ranch "/lib/erlang/lib:" 
                                                             cowboy "/lib/erlang/lib:"
                                                             cowlib "/lib/erlang/lib")))))
            (add-before 'build 'build-more
                        (lambda _
                          (invoke "rebar3" "release" "--include-erts" "false")))
            (replace 'install
                     (lambda* (#:key outputs #:allow-other-keys)
                              (let* ((reading-heap "_build/default/rel/reading_heap")
                                     (out (assoc-ref outputs "out")))
                                (copy-recursively reading-heap out)
                                (install-file "config/vm.args" 
                                           (string-append out "/releases/" #$version "/"))))))))
    (synopsis "Media Queue Manager")
    (description "Manage your media consumption queue with erlang and heaps")
    (home-page "https://codeberg.org/languidnights/reading_heap")
    (license license:agpl3)))