[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
43/44: gnu: i3status-rust: Substitute full paths of commands.
From: |
guix-commits |
Subject: |
43/44: gnu: i3status-rust: Substitute full paths of commands. |
Date: |
Mon, 12 Feb 2024 07:40:46 -0500 (EST) |
efraim pushed a commit to branch rust-team
in repository guix.
commit 318388259cd0ee4feb5cb9955e9d18ac0af4e6e7
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Feb 12 13:47:31 2024 +0200
gnu: i3status-rust: Substitute full paths of commands.
* gnu/packages/rust-apps.scm (i3status-rust)[arguments]: Add a phase to
substitute the full paths of commands. Adjust wrap-i3status phase to
wrap fewer packages.
[inputs]: Remove input labels.
Change-Id: Ib712ff56562a8ec53965971c1d7ca5bfcbc2abdc
---
gnu/packages/rust-apps.scm | 59 +++++++++++++++++++++++++++++-----------------
1 file changed, 38 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index f5fd0623ef..46dec9e9b1 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -849,6 +849,26 @@ characters, ASCII whitespace characters, other ASCII
characters and non-ASCII.")
(share (string-append out "/share")))
(substitute* "src/util.rs"
(("/usr/share/i3status-rust") share)))))
+ (add-after 'unpack 'substitute-package-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define* (substitute-command-block* file command full-command)
+ (substitute* file
+ (((string-append "Command::new\\(\"" command "\"\\)"))
+ (string-append "Command::new(\"" full-command "\")"))))
+ (substitute-command-block*
"src/blocks/keyboard_layout/set_xkb_map.rs"
+ "setxkbmap" (search-input-file inputs "/bin/setxkbmap"))
+ (substitute-command-block* "src/blocks/sound/alsa.rs"
+ "alsactl" (search-input-file inputs "/sbin/alsactl"))
+ (substitute-command-block* "src/blocks/sound/alsa.rs"
+ "amixer" (search-input-file inputs "/bin/amixer"))
+ (substitute-command-block* "src/blocks/speedtest.rs"
+ "speedtest-cli" (search-input-file inputs "/bin/speedtest-cli"))
+ (substitute-command-block* "src/blocks/xrandr.rs"
+ "xrandr" (search-input-file inputs "/bin/xrandr"))
+ (substitute-command-block* "src/util.rs"
+ "sh" (search-input-file inputs "/bin/sh"))
+ (substitute-command-block* "src/subprocess.rs"
+ "sh" (search-input-file inputs "/bin/sh"))))
(add-after 'install 'install-resources
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
@@ -860,32 +880,29 @@ characters, ASCII whitespace characters, other ASCII
characters and non-ASCII.")
(lambda (input)
(string-append
(assoc-ref inputs input) "/bin"))
- '("alsa-utils" "coreutils" "curl" "dbus"
- "ibus" "iproute" "kdeconnect" "lm-sensors"
- "pulseaudio" "openssl" "setxkbmap"
- "speedtest-cli" "xdg-utils" "xrandr"
- "zlib"))))
+ '("coreutils" "curl" "ibus" "iproute2" "kdeconnect"
+ "xdg-utils" "zlib"))))
(wrap-program (string-append out "/bin/i3status-rs")
`("PATH" prefix ,paths))))))))
(native-inputs
(list pkg-config))
(inputs
- `(("alsa-utils" ,alsa-utils)
- ("bash-minimal" ,bash-minimal)
- ("coreutils" ,coreutils)
- ("curl" ,curl)
- ("dbus" ,dbus)
- ("ibus" ,ibus)
- ("iproute" ,iproute)
- ("kdeconnect" ,kdeconnect)
- ("lm-sensors" ,lm-sensors "lib")
- ("pulseaudio" ,pulseaudio)
- ("openssl" ,openssl)
- ("setxkbmap" ,setxkbmap)
- ("speedtest-cli" ,speedtest-cli)
- ("xdg-utils" ,xdg-utils)
- ("xrandr" ,xrandr)
- ("zlib" ,zlib)))
+ (list alsa-utils
+ bash-minimal
+ coreutils
+ curl
+ dbus
+ ibus
+ iproute
+ kdeconnect
+ (list lm-sensors "lib")
+ pulseaudio
+ openssl
+ setxkbmap
+ speedtest-cli
+ xdg-utils
+ xrandr
+ zlib))
(home-page "https://github.com/greshake/i3status-rust/")
(synopsis "Replacement for i3status, written in Rust")
(description "@code{i3status-rs} is a feature-rich and resource-friendly
- 11/44: gnu: Add rust-maildir-0.6., (continued)
- 11/44: gnu: Add rust-maildir-0.6., guix-commits, 2024/02/12
- 06/44: gnu: Add rust-neli-wifi-0.6., guix-commits, 2024/02/12
- 14/44: gnu: Add rust-signal-hook-tokio-0.3., guix-commits, 2024/02/12
- 25/44: gnu: Add rust-event-listener-4., guix-commits, 2024/02/12
- 17/44: gnu: rust-parking-2: Update to 2.2.0., guix-commits, 2024/02/12
- 38/44: gnu: rust-portable-atomic-1: Update to 1.6.0., guix-commits, 2024/02/12
- 16/44: gnu: Add rust-async-pidfd-0.1., guix-commits, 2024/02/12
- 30/44: gnu: Add rust-ordered-stream-0.2., guix-commits, 2024/02/12
- 34/44: gnu: rust-async-process-1: Update to 1.8.1., guix-commits, 2024/02/12
- 44/44: gnu: i3status-rust: Remove some inputs., guix-commits, 2024/02/12
- 43/44: gnu: i3status-rust: Substitute full paths of commands.,
guix-commits <=
- 02/44: gnu: Add rust-backon-0.4., guix-commits, 2024/02/12
- 08/44: gnu: Add rust-from-variants-0.6., guix-commits, 2024/02/12
- 15/44: gnu: rust-swayipc-types-1: Update to 1.3.1., guix-commits, 2024/02/12
- 21/44: gnu: Add rust-wayrs-proto-parser-2, guix-commits, 2024/02/12
- 27/44: gnu: Add rust-async-channel-2., guix-commits, 2024/02/12
- 29/44: gnu: Add rust-async-io-2 and rust-async-net-2., guix-commits, 2024/02/12
- 37/44: gnu: Add rust-pandoc-0.8., guix-commits, 2024/02/12
- 39/44: gnu: rust-portable-atomic-util-0.1: Update to 0.1.5., guix-commits, 2024/02/12
- 26/44: gnu: Add rust-event-listener-strategy-0.4., guix-commits, 2024/02/12
- 24/44: gnu: Add rust-wayrs-protocols-0.13., guix-commits, 2024/02/12