unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add Hydrogen.
@ 2015-06-29 16:27 Ricardo Wurmus
  2015-07-01 13:34 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-06-29 16:27 UTC (permalink / raw)
  To: Guix-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-Hydrogen.patch --]
[-- Type: text/x-patch, Size: 3982 bytes --]

From 795a43bf73a3a3417e095a5f88c48603e2a67ad7 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <rekado@elephly.net>
Date: Mon, 29 Jun 2015 18:26:43 +0200
Subject: [PATCH] gnu: Add Hydrogen.

* gnu/packages/music.scm (hydrogen): New variable.
---
 gnu/packages/music.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 9cf9772..4b1f92f 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -51,8 +51,10 @@
   #:use-module (gnu packages netpbm)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages pulseaudio) ;libsndfile
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages rdf)
   #:use-module (gnu packages rsync)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages texlive)
@@ -61,6 +63,74 @@
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages zip))
 
+(define-public hydrogen
+  (package
+    (name "hydrogen")
+    (version "0.9.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "mirror://sourceforge/hydrogen/Hydrogen/"
+                    (version-prefix version 3) "%20Sources/"
+                    "hydrogen-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1fvyp6gfzcqcc90dmaqbm11p272zczz5pfz1z4lj33nfr7z0bqgb"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;no "check" target
+       #:phases
+       ;; TODO: Add scons-build-system and use it here.
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'scons-propagate-environment
+                    (lambda _
+                      ;; By design, SCons does not, by default, propagate
+                      ;; environment variables to subprocesses.  See:
+                      ;; <http://comments.gmane.org/gmane.linux.distributions.nixos/4969>
+                      ;; Here, we modify the Sconstruct file to arrange for
+                      ;; environment variables to be propagated.
+                      (substitute* "Sconstruct"
+                        (("^env = Environment\\(")
+                         "env = Environment(ENV=os.environ, "))))
+         (replace 'build
+                  (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let ((out (assoc-ref outputs "out")))
+                      (zero? (system* "scons"
+                                      (string-append "prefix=" out)
+                                      "lrdf=0" ; cannot be found
+                                      "lash=1")))))
+         (add-before
+          'install
+          'fix-img-install
+          (lambda _
+            ;; The whole ./data/img directory is copied to the target first.
+            ;; Scons complains about existing files when we try to install all
+            ;; images a second time.
+            (substitute* "Sconstruct"
+              (("os.path.walk\\(\"./data/img/\",install_images,env\\)") ""))
+            #t))
+         (replace 'install (lambda _ (zero? (system* "scons" "install")))))))
+    (native-inputs
+     `(("scons" ,scons)
+       ("python" ,python-2)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("zlib" ,zlib)
+       ("libtar" ,libtar)
+       ("alsa-lib" ,alsa-lib)
+       ("jack" ,jack-1)
+       ("lash" ,lash)
+       ;;("lrdf" ,lrdf) ;FIXME: cannot be found by scons
+       ("qt" ,qt-4)
+       ("libsndfile" ,libsndfile)))
+    (home-page "http://www.hydrogen-music.org")
+    (synopsis "Drum machine")
+    (description
+     "Hydrogen is an advanced drum machine for GNU/Linux.  Its main goal is to
+enable professional yet simple and intuitive pattern-based drum programming.")
+    (license license:gpl2+)))
+
 (define-public lilypond
   (package
     (name "lilypond")
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Add Hydrogen.
  2015-06-29 16:27 [PATCH] Add Hydrogen Ricardo Wurmus
@ 2015-07-01 13:34 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-07-01 13:34 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Ricardo Wurmus <rekado@elephly.net> skribis:

> From 795a43bf73a3a3417e095a5f88c48603e2a67ad7 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Mon, 29 Jun 2015 18:26:43 +0200
> Subject: [PATCH] gnu: Add Hydrogen.
>
> * gnu/packages/music.scm (hydrogen): New variable.

LGTM, thanks.

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-01 13:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-29 16:27 [PATCH] Add Hydrogen Ricardo Wurmus
2015-07-01 13:34 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).