guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: Add surge-synth.


From: guix-commits
Subject: 03/03: gnu: Add surge-synth.
Date: Sat, 19 Sep 2020 16:53:42 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 1bc5a77f0a346c3c4156d8443de4d709a652e6e1
Author: Alexandros Theodotou <alex@zrythm.org>
AuthorDate: Thu Sep 10 20:07:32 2020 +0100

    gnu: Add surge-synth.
    
    * gnu/packages/music.scm (surge-synth): New variable.
    
    Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
 gnu/packages/music.scm | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 6285dee..899cc6a 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -147,6 +147,7 @@
   #:use-module (gnu packages vim)       ;for 'xxd'
   #:use-module (gnu packages web)
   #:use-module (gnu packages wxwidgets)
+  #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xiph)
@@ -777,6 +778,75 @@ are helpful when working in problem spaces where timing is 
important (such as
 audio and video).")
     (license license:bsd-2)))
 
+(define-public surge-synth
+  (package
+   (name "surge-synth")
+   (version "1.7.1")
+   (source
+     (origin
+       (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/surge-synthesizer/surge";)
+               (commit (string-append "release_" version))
+               (recursive? #t))) ; build system expects modules to be there
+        (file-name (git-file-name name version))
+        (sha256
+         (base32
+          "1jhk8iaqh89dnci4446b47315v2lc8gclraygk8m9jl20zpjxl0l"))))
+   (build-system cmake-build-system)
+   (arguments
+    `(#:tests? #f ; no tests included
+      #:phases
+      (modify-phases %standard-phases
+        (add-after 'unpack 'replace-python
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (substitute* "CMakeLists.txt"
+              ((" python ")
+               (string-append " " (assoc-ref inputs "python")
+                              "/bin/python3 ")))
+            #t))
+        (add-after 'unpack 'fix-data-directory-name
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (substitute* "src/common/SurgeStorage.cpp"
+              (("/usr") (assoc-ref outputs "out")))
+            #t))
+        (replace 'install ; no install target
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let* ((src (assoc-ref inputs "source"))
+                   (out (assoc-ref outputs "out"))
+                   (share (string-append out "/share"))
+                   (lib (string-append out "/lib"))
+                   (lv2 (string-append lib "/lv2"))
+                   (vst3 (string-append lib "/vst3")))
+              (mkdir-p lv2)
+              (mkdir-p vst3)
+              ;; Install LV2 plugin.
+              (copy-recursively "surge_products/Surge.lv2"
+                                (string-append lv2 "/Surge.lv2"))
+              ;; Install VST3 plugin.
+              (copy-recursively "surge_products/Surge.vst3"
+                                (string-append vst3 "/Surge.vst3"))
+              ;; Install data.
+              (copy-recursively (string-append src "/resources/data")
+                                (string-append share "/Surge"))
+              #t))))))
+   (inputs
+    `(("cairo" ,cairo)
+      ("libxkbcommon" ,libxkbcommon)
+      ("python" ,python)
+      ("xcb-util" ,xcb-util)
+      ("xcb-util-cursor" ,xcb-util-cursor)
+      ("xcb-util-keysyms" ,xcb-util-keysyms)))
+   (native-inputs
+    `(("pkg-config" ,pkg-config)))
+   (home-page "https://surge-synthesizer.github.io/";)
+   (synopsis "Synthesizer plugin")
+   (description
+    "Surge is a subtractive hybrid digital synthesizer.  Each patch contains
+two @dfn{scenes} which are separate instances of the entire synthesis
+engine (except effects) that can be used for layering or split patches.")
+   (license license:gpl3+)))
+
 (define-public klick
   (package
     (name "klick")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]