aboutsummaryrefslogtreecommitdiff
path: root/crn/packages/erlang-xyz.scm
diff options
context:
space:
mode:
authorChristopher R. Nelson <christopher.nelson@languidnights.com>2026-02-01 22:28:22 -0500
committerChristopher R. Nelson <christopher.nelson@languidnights.com>2026-02-01 22:28:22 -0500
commitdc68a930a43bd04914429d9567e29247c5f88929 (patch)
treeafb7583f7204fc7bbf3683bb782b391ad6700f42 /crn/packages/erlang-xyz.scm
parentdecdb264393ce5f2f7be857a6b4fff76824acbfd (diff)
reading-heap packages
Diffstat (limited to 'crn/packages/erlang-xyz.scm')
-rw-r--r--crn/packages/erlang-xyz.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/crn/packages/erlang-xyz.scm b/crn/packages/erlang-xyz.scm
new file mode 100644
index 0000000..c2977e5
--- /dev/null
+++ b/crn/packages/erlang-xyz.scm
@@ -0,0 +1,54 @@
+(define-module (crn 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.1")
+ (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 "0hxbwsfvdlng8irns4bj8cg12rc9jhjs1bf61vhm0w0lgcl5xciz"))))
+ (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)))