diff mbox series

[bug#54529,v2] Added orca-lang package

Message ID 20220323023029.7747-1-yewscion@gmail.com
State Accepted
Headers show
Series [bug#54529,v2] Added orca-lang package | expand

Commit Message

Christopher Rodriguez March 23, 2022, 2:30 a.m. UTC
---

Added the alsa-plugins package (out and pulseaudio outputs) as
propogated inputs because MIDI output depends on being able to use
libasound_module_conf_pulse.so.

 gnu/packages/music.scm | 62 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

Comments

M March 23, 2022, 7:29 a.m. UTC | #1
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +                  (lambda* (#:key inputs outputs #:allow-other-keys)
> +                           (setenv "CC" "gcc")

This is broken when cross-compiling, try 'cc-for-target'.
Additionally, 'outputs' and 'inputs' are unused here.

Greetings,
Maxime.
M March 23, 2022, 7:29 a.m. UTC | #2
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +      `(#:tests?
> +        #f

Why?
M March 23, 2022, 7:30 a.m. UTC | #3
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +         (delete 'configure)
> +         (delete 'check)
> +         (delete 'patch-shebangs)
> +         (delete 'validate-documentation-location)
> +         (delete 'delete-info-dir-file)
> +         (delete 'patch-dot-desktop-files)
> +         (delete 'reset-gzip-timestamps)

Why are these phases deleted?
M March 23, 2022, 7:30 a.m. UTC | #4
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +     (inputs `(("ncurses" ,ncurses)
> +               ("portmidi" ,portmidi)))

Preferably use the new inputs style: (inputs (list ncurses portmidi)).
M March 23, 2022, 7:30 a.m. UTC | #5
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +     (propagated-inputs `(("alsa-plugins" ,alsa-plugins)
> +                          ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio")))

Why are these propagated?
M March 23, 2022, 7:32 a.m. UTC | #6
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +     (synopsis "Musical Esoteric Programming Language")

Why the capital letters? And why mention ‘Esoteric’ in the synopsis and
description?  Also, it is not actually a programming language, it is
more an implementation of a language for producing music.

Greetings,
Maxime.
M March 23, 2022, 7:33 a.m. UTC | #7
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> *bang*

This is not texinfo markup.
M March 23, 2022, 7:33 a.m. UTC | #8
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +(define-public orca-lang

Personally I'd go with "orca-music".
M March 23, 2022, 7:34 a.m. UTC | #9
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +  (let ((commit "5ba56ca67baae3db140f8b7a2b2fc46bbac5602f")
> +        (revision "5"))

Where does this revision come from?  This is the first version of orca
in Guix.
M March 23, 2022, 7:35 a.m. UTC | #10
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +     (version (git-version "git" revision commit))

"git" is not a version numberr, I suggest "0" instead.
Also, why is a ‘random’ git commit used instead of an upstream version?

Greetings,
Maxime.
M March 23, 2022, 7:36 a.m. UTC | #11
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +                                  (dest-exa
> +                                   (string-append dest-lib "/examples"))

I don't think that abbreviations are necessary here, these's enough
space here.
M March 23, 2022, 7:36 a.m. UTC | #12
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +         (replace 'install
> +                  (lambda* (#:key outputs #:allow-other-keys)

Spacing went wrong here, try running "./pre-inst-env guix style" on the
package.
M March 23, 2022, 7:36 a.m. UTC | #13
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +     (license license:agpl3))))

Is it agpl3-only or agpl3+?
M March 23, 2022, 7:38 a.m. UTC | #14
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +                                  (dest-lib
> +                                   (string-append out "/share"))

This seems rather confusing naming.  Libraries are put in [...]/lib,
not [...]/share.  Alsso, I think you could drop the 'dest-' prefix
here.
M March 23, 2022, 7:38 a.m. UTC | #15
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +                             #t))))))

Phases do not need to return #f anymore.
M March 23, 2022, 7:40 a.m. UTC | #16
Christopher Rodriguez schreef op di 22-03-2022 om 22:30 [-0400]:
> +     (inputs `(("ncurses" ,ncurses)

If you do this, you'll have to add the native-search-paths of ncurses
to orca-lang, because of <https://issues.guix.gnu.org/issue/22138>.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 9c8203aa80..9e1b078436 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -6879,3 +6879,65 @@  (define-public musikcube
 streaming audio server.")
     (home-page "https://musikcube.com/")
     (license license:bsd-3)))
+(define-public orca-lang
+  (let ((commit "5ba56ca67baae3db140f8b7a2b2fc46bbac5602f")
+        (revision "5"))
+    (package
+     (name "orca-lang")
+     (version (git-version "git" revision commit))
+     (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.sr.ht/~rabbits/orca")
+                    (commit commit)))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1mnhk68slc6g5y5348vj86pmnz90a385jxvm3463fic79k90gckd"))))
+     (build-system gnu-build-system)
+     (arguments
+      `(#:tests?
+        #f
+        #:phases
+        (modify-phases
+         %standard-phases
+         (delete 'configure)
+         (delete 'check)
+         (delete 'patch-shebangs)
+         (delete 'validate-documentation-location)
+         (delete 'delete-info-dir-file)
+         (delete 'patch-dot-desktop-files)
+         (delete 'reset-gzip-timestamps)
+         (replace 'build
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                           (setenv "CC" "gcc")
+                           (invoke "make" "release")))
+         (replace 'install
+                  (lambda* (#:key outputs #:allow-other-keys)
+                           (let* ((out
+                                   (assoc-ref outputs "out"))
+                                  (dest-bin
+                                   (string-append out "/bin"))
+                                  (dest-lib
+                                   (string-append out "/share"))
+                                  (dest-exa
+                                   (string-append dest-lib "/examples"))
+                                  (dest-doc
+                                   (string-append dest-lib "/doc")))
+                             (install-file "./build/orca" dest-bin)
+                             (copy-recursively "./examples" dest-exa)
+                             (install-file "./README.md" dest-doc)
+                             #t))))))
+     (inputs `(("ncurses" ,ncurses)
+               ("portmidi" ,portmidi)))
+     (native-inputs `(("pkg-config" ,pkg-config)))
+     (propagated-inputs `(("alsa-plugins" ,alsa-plugins)
+                          ("alsa-plugins:pulseaudio" ,alsa-plugins "pulseaudio")))
+     (synopsis "Musical Esoteric Programming Language")
+     (description
+      "Orca is an esoteric programming language and live editor designed to
+quickly create procedural sequencers.  Every letter of the alphabet is an
+operation, lowercase letters execute on *bang*, and uppercase letters execute
+each frame.")
+     (home-page "https://100r.co/site/orca.html")
+     (license license:agpl3))))