[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#63065] [PATCH v4 7/7] gnu: Add yabridgectl.
From: |
Sughosha |
Subject: |
[bug#63065] [PATCH v4 7/7] gnu: Add yabridgectl. |
Date: |
Wed, 1 Nov 2023 10:19:58 +0100 |
* gnu/packages/audio.scm (yabridgectl): New variable.
* gnu/packages/patches/yabridgectl-5.0.4-use-system-reflink.patch: New
patch file.
* gnu/local.mk: Register it.
Change-Id: I6a7fe3eff7852c60c306c4559cf00a4161ce81e1
---
gnu/local.mk | 1 +
gnu/packages/audio.scm | 61 +++++++++++++++++++
...yabridgectl-5.0.4-use-system-reflink.patch | 23 +++++++
3 files changed, 85 insertions(+)
create mode 100644
gnu/packages/patches/yabridgectl-5.0.4-use-system-reflink.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 4718ad49a5..e535a8403e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2168,6 +2168,7 @@ dist_patch_DATA =
\
%D%/packages/patches/xygrib-fix-finding-data.patch \
%D%/packages/patches/xygrib-newer-proj.patch \
%D%/packages/patches/yabridge-5.0.4-fix-dependency-search.patch \
+ %D%/packages/patches/yabridgectl-5.0.4-use-system-reflink.patch \
%D%/packages/patches/yggdrasil-extra-config.patch \
%D%/packages/patches/zig-0.9-riscv-support.patch \
%D%/packages/patches/zig-do-not-link-against-librt.patch \
diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index aae97d4169..102d064fb2 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -76,6 +76,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
+ #:use-module (gnu packages crates-io)
#:use-module (gnu packages curl)
#:use-module (gnu packages dbm)
#:use-module (gnu packages documentation)
@@ -144,6 +145,7 @@ (define-module (gnu packages audio)
#:use-module (gnu packages xiph)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (guix build-system cargo)
#:use-module (guix build-system cmake)
#:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
@@ -6056,6 +6058,65 @@ (define-public yabridge
quick startup times.")
(license license:gpl3+)))
+(define-public yabridgectl
+ (package/inherit yabridge
+ (name "yabridgectl")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/robbert-vdh/yabridge")
+ (commit (package-version yabridge))))
+ (sha256
+ (base32
+ "0ayl706nv67jkixbrh9z7225gdwg2s4rzndx77761x33mk6by7a8"))
+ (patches
+ (search-patches
+ "yabridgectl-5.0.4-use-system-reflink.patch"))))
+ (build-system cargo-build-system)
+ (arguments
+ (list #:cargo-inputs
+ `(("rust-anyhow" ,rust-anyhow-1)
+ ("rust-clap" ,rust-clap-3)
+ ("rust-colored" ,rust-colored-2)
+ ("rust-is-executable" ,rust-is-executable-1)
+ ("rust-goblin" ,rust-goblin-0.6)
+ ("rust-libloading" ,rust-libloading-0.7)
+ ("rust-promptly" ,rust-promptly-0.3)
+ ("rust-rayon" ,rust-rayon-1)
+ ("rust-reflink" ,rust-reflink-0.1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-serde-jsonrc" ,rust-serde-jsonrc-0.1)
+ ("rust-textwrap" ,rust-textwrap-0.11)
+ ("rust-toml" ,rust-toml-0.5)
+ ("rust-walkdir" ,rust-walkdir-2)
+ ("rust-which" ,rust-which-4)
+ ("rust-xdg" ,rust-xdg-2))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'change-directory
+ (lambda _
+ (chdir "tools/yabridgectl")))
+ (add-after 'change-directory 'patch-paths
+ (lambda _
+ (with-directory-excursion "src"
+ (substitute* '("config.rs" "main.rs")
+ (("/usr") #$yabridge)))))
+ (add-after 'install 'wrap-program
+ (lambda _
+ (wrap-program (string-append #$output "/bin/yabridgectl")
+ `("LD_LIBRARY_PATH" ":" prefix
+ (,(string-append #$yabridge "/lib")
+ ,(string-append #$dbus "/lib")))))))))
+ (native-inputs '())
+ (inputs
+ (list dbus))
+ (propagated-inputs
+ (list yabridge))
+ (synopsis "Utility to set up and update yabridge")
+ (description
+ "@command{yabridgectl} is a tool to setup and update @code{yabridge}.")))
+
(define-public ableton-link
(package
(name "ableton-link")
diff --git a/gnu/packages/patches/yabridgectl-5.0.4-use-system-reflink.patch
b/gnu/packages/patches/yabridgectl-5.0.4-use-system-reflink.patch
new file mode 100644
index 0000000000..d863f35c2f
--- /dev/null
+++ b/gnu/packages/patches/yabridgectl-5.0.4-use-system-reflink.patch
@@ -0,0 +1,23 @@
+rust-reflink version 0.1.3 available in Guix is patched with the fix for
+the assumption of a 64-bit toolchain.
+
+---
+ tools/yabridgectl/Cargo.toml | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/yabridgectl/Cargo.toml b/tools/yabridgectl/Cargo.toml
+index f2ea73fb..09490e43 100644
+--- a/tools/yabridgectl/Cargo.toml
++++ b/tools/yabridgectl/Cargo.toml
+@@ -18,7 +18,7 @@ goblin = { version = "0.6", default_features = false,
features = ["std", "pe32",
+ libloading = "0.7.3"
+ promptly = "0.3.1"
+ # Version 0.1.3 from crates.io assumes a 64-bit toolchain
+-reflink = { git = "https://github.com/nicokoch/reflink", rev =
"e8d93b465f5d9ad340cd052b64bbc77b8ee107e2" }
++reflink = "0.1.3"
+ rayon = "1.5.1"
+ serde = "1.0.133"
+ serde_derive = "1.0.133"
+--
+2.39.2
+
--
2.41.0
- [bug#63065] [PATCH v4 0/7] gnu: Add yabridgectl, Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 1/7] gnu: Add rust-rustyline-derive-0.6., Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 2/7] gnu: rust-rustyline-9: Update to 9.1.2., Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 3/7] gnu: Add rust-promptly., Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 4/7] gnu: Add rust-reflink-0.1., Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 5/7] gnu: Add rust-ryu-0.2., Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 6/7] gnu: Add rust-serde-jsonrc-0.1., Sughosha, 2023/11/01
- [bug#63065] [PATCH v4 7/7] gnu: Add yabridgectl.,
Sughosha <=