unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sughosha via Guix-patches via <guix-patches@gnu.org>
To: 65367@debbugs.gnu.org
Cc: Sughosha <sughosha@disroot.org>
Subject: [bug#65367] [PATCH v2 4/4] gnu: Add stargate.
Date: Tue, 31 Oct 2023 14:44:43 +0100	[thread overview]
Message-ID: <a437054bbe9463d145821d0cf6e3148ba30ddc4e.1698759715.git.sughosha@disroot.org> (raw)
In-Reply-To: <cover.1698759715.git.sughosha@disroot.org>

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

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b181c86b45..34f46fbb2c 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -3479,6 +3479,188 @@ (define-public aj-snapshot
 from the command line.")
     (license license:gpl3+)))
 
+(define-public stargate
+  (package
+    (name "stargate")
+    (version "23.08.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/stargatedaw/stargate")
+                    (commit (string-append "release-" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0flnvf9f175bk8xmhpfqjvw10jxhd5cl55viwahai3p531ld30zc"))
+              (modules '((guix build utils)))
+              ;; Devendor bundled packages.
+              (snippet
+               '(with-directory-excursion "src"
+                  (delete-file-recursively "sg_py_vendor")
+                  (substitute* (find-files "sglib" "\\.py$")
+                    (("from sg_py_vendor ") ""))
+                  (substitute* "Makefile"
+                    ((" sg_py_vendor") "")
+                    (("install -m 755 vendor") "# install -m 755 vendor"))))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:test-target "tests"
+           #:make-flags
+           #~(list "distro"
+                   "PREFIX=/"
+                   "SG_DIR=/lib/stargate"
+                   (string-append "CC=" #$(cc-for-target))
+                   (string-append "CXX=" #$(cxx-for-target))
+                   (string-append "DESTDIR=" #$output))
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'unpack 'change-directory
+                 (lambda _
+                   (chdir "src")))
+               (delete 'configure) ;no configure script
+               (add-before 'build 'patch-paths
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (substitute* "sgui/widgets/hardware_dialog.py"
+                     (("libportaudio\\.so")
+                      (search-input-file inputs "/lib/libportaudio.so"))
+                     (("libportmidi\\.so")
+                      (search-input-file inputs "/lib/libportmidi.so")))
+                   (substitute* "test_parse.sh"
+                     (("python") (which "python3")))
+                   (substitute* "engine/tests/test_daw.c"
+                     (("INSTALL_PREFIX") "// INSTALL_PREFIX"))
+                   (with-directory-excursion "files/share"
+                     (substitute* '("applications/stargate.desktop"
+                                    "doc/stargate/copyright")
+                       (("/usr") #$output)))))
+               (add-before 'check 'check-setup
+                 (lambda _
+                   (setenv "HOME" "/tmp")
+                   (setenv "LD_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
+                   ;; test_to_from_str_reorder fails.
+                   (delete-file "test/sglib/models/daw/routing/test_midi.py")
+                   ;; Disable testing with browser.
+                   (substitute* "Makefile"
+                     (("\\$\\(BROWSER\\)") "# $(BROWSER)"))))
+               (replace 'install
+                 (lambda* (#:key (make-flags '()) #:allow-other-keys)
+                   (let ((bin (string-append #$output "/bin"))
+                         (lib (string-append #$output "/lib/stargate"))
+                         (share (string-append #$output "/share")))
+                     (rename-file "files/share" "share")
+                     (apply invoke "make" "install_self_contained" make-flags)
+                     (mkdir-p bin)
+                     (symlink (string-append lib "/scripts/stargate")
+                              (string-append bin "/stargate"))
+                     (copy-recursively "share" share))))
+               (add-after 'install 'wrap-program
+                 (lambda _
+                   (wrap-program (string-append #$output "/bin/stargate")
+                     `("GUIX_PYTHONPATH" ":" prefix
+                       (,(getenv "GUIX_PYTHONPATH")))
+                     `("LD_LIBRARY_PATH" ":" prefix
+                       (,(getenv "PATH")))
+                     `("PATH" ":" prefix
+                       (,(getenv "PATH")))))))))
+    (native-inputs
+     (list pkg-config
+           python-gcovr
+           python-packaging
+           python-pytest
+           python-pytest-cov
+           python-pytest-runner))
+    (inputs
+     (list alsa-lib
+           bash-minimal
+           fftw
+           fftwf
+           jq
+           libsndfile
+           portaudio
+           portmidi
+           python
+           python-jinja2
+           python-mido
+           python-mutagen
+           python-psutil
+           python-pymarshal
+           python-pyqt
+           python-pyyaml
+           python-wavefile
+           python-yq
+           rubberband
+           ;; Fork of the libsbsms.
+           (let ((commit "90fab3440063dc9b6c1c2a8f74c2d92bd0e423f9")
+                 (revision "0"))
+             (package/inherit libsbsms
+               (name "stargate-sbsms")
+               (version (git-version "0" revision commit))
+               (source
+                (origin
+                  (method git-fetch)
+                  (uri
+                   (git-reference
+                     (url "https://github.com/stargatedaw/stargate-sbsms")
+                     (commit commit)))
+                  (sha256
+                   (base32
+                    "11srnzgpavcj6n70zjdm7488jzrprk71mg9dgr1sa6vwp575hf2m"))))
+               (arguments
+                (substitute-keyword-arguments (package-arguments libsbsms)
+                  ((#:phases phases)
+                   #~(modify-phases #$phases
+                       (delete 'fix-ar-lib-path)
+                       (add-before 'build 'change-directory
+                         (lambda _
+                           (chdir "cli")))
+                       (replace 'configure
+                         (lambda _
+                           (setenv "DESTDIR" #$output)
+                           (setenv "PREFIX" "/")))
+                       (add-after 'install 'rename-binary
+                            (lambda _
+                              (with-directory-excursion
+                                (string-append #$output "/bin")
+                                (rename-file "sbsms"
+                                            "stargate-sbsms"))))
+                       (delete 'check)))))
+               (native-inputs
+                (list libsndfile))
+               (home-page "https://stargatedaw/stargate-sbsms")))
+           ;; Fork of soundtouch with extra features and fixes.
+           (let ((commit "464f474c0be5d7e0970909dd30593012e4621468")
+                 (revision "0"))
+             (package/inherit soundtouch
+               (name "stargate-soundtouch")
+               (version (git-version "0" revision commit))
+               (source
+                (origin
+                  (method git-fetch)
+                  (uri
+                   (git-reference
+                     (url "https://github.com/stargatedaw/stargate-soundtouch")
+                     (commit commit)))
+                  (sha256
+                   (base32
+                    "1aw2j1f10p8n4s197b1nd3g1rjvwbrrszc9gwsbwk01c6nb3nr9v"))))
+               (arguments
+                (list #:phases
+                      #~(modify-phases %standard-phases
+                          (add-after 'install 'rename-binary
+                            (lambda _
+                              (with-directory-excursion
+                                (string-append #$output "/bin")
+                                (rename-file "soundstretch"
+                                            "stargate-soundstretch")))))))
+               (home-page "https://stargatedaw/stargate-soundtouch")))))
+    (home-page "https://github.com/stargatedaw/stargate")
+    (synopsis "Digital audio workstation")
+    (description
+     "Stargate is a digital audio workstation, with built-in instrument and
+effect plugins and wave editor, providing innovative features, especially for
+EDM production.")
+    (license license:gpl3)))
+
 (define-public qtractor
   (package
     (name "qtractor")
-- 
2.41.0





  parent reply	other threads:[~2023-10-31 13:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 15:35 [bug#65367] [PATCH 0/5] gnu: Add stargate Sughosha via Guix-patches via
2023-08-18 15:35 ` [bug#65368] [PATCH 1/5] gnu: Add python-wavefile Sughosha via Guix-patches via
2023-10-08 23:50   ` [bug#65368] Sharlatan Hellseher
2023-08-18 15:35 ` [bug#65369] [PATCH 2/5] gnu: Add python-pymarshal Sughosha via Guix-patches via
2023-08-18 15:35 ` [bug#65367] [PATCH 3/5] gnu: Add python-packaging Sughosha via Guix-patches via
2023-08-18 15:35 ` [bug#65367] [PATCH 4/5] gnu: Add python-mido Sughosha via Guix-patches via
2023-08-18 15:35 ` [bug#65367] [PATCH 5/5] gnu: Add stargate Sughosha via Guix-patches via
2023-10-31 13:44 ` [bug#65367] [PATCH v2 0/4] " Sughosha via Guix-patches via
2023-10-31 13:44   ` [bug#65367] [PATCH v2 1/4] gnu: Add python-wavefile Sughosha via Guix-patches via
2023-10-31 13:44   ` [bug#65367] [PATCH v2 2/4] gnu: Add python-pymarshal Sughosha via Guix-patches via
2023-10-31 13:44   ` [bug#65367] [PATCH v2 3/4] gnu: Add python-mido Sughosha via Guix-patches via
2023-10-31 13:44   ` Sughosha via Guix-patches via [this message]
2023-10-31 17:08 ` [bug#65367] [PATCH v3 0/4] gnu: Add stargate Sughosha via Guix-patches via
2023-10-31 17:08   ` [bug#65367] [PATCH v3 1/4] gnu: Add python-wavefile Sughosha via Guix-patches via
2023-10-31 17:08   ` [bug#65367] [PATCH v3 2/4] gnu: Add python-pymarshal Sughosha via Guix-patches via
2023-10-31 17:08   ` [bug#65367] [PATCH v3 3/4] gnu: Add python-mido Sughosha via Guix-patches via
2023-10-31 17:08   ` [bug#65367] [PATCH v3 4/4] gnu: Add stargate Sughosha via Guix-patches via
2024-06-05 15:52 ` [bug#65367] [PATCH v4 0/4] " Sughosha via Guix-patches via
2024-06-05 15:52   ` [bug#65367] [PATCH v4 1/4] gnu: Add python-pymarshal Sughosha via Guix-patches via
2024-06-05 15:52   ` [bug#65367] [PATCH v4 2/4] gnu: Add python-mido Sughosha via Guix-patches via
2024-06-05 15:52   ` [bug#65367] [PATCH v4 3/4] gnu: Add python-wavefile Sughosha via Guix-patches via
2024-06-05 15:52   ` [bug#65367] [PATCH v4 4/4] gnu: Add stargate Sughosha via Guix-patches via
2024-06-13  9:36   ` bug#65367: [PATCH v4 0/4] " Ludovic Courtès
2024-06-13 16:01     ` [bug#65367] " Sughosha via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a437054bbe9463d145821d0cf6e3148ba30ddc4e.1698759715.git.sughosha@disroot.org \
    --to=guix-patches@gnu.org \
    --cc=65367@debbugs.gnu.org \
    --cc=sughosha@disroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).