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
This commit is contained in:
parent
2c9ce18f09
commit
b8711c4b9d
1 changed files with 38 additions and 21 deletions
|
@ -849,6 +849,26 @@ characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
|
||||||
(share (string-append out "/share")))
|
(share (string-append out "/share")))
|
||||||
(substitute* "src/util.rs"
|
(substitute* "src/util.rs"
|
||||||
(("/usr/share/i3status-rust") share)))))
|
(("/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
|
(add-after 'install 'install-resources
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
@ -860,32 +880,29 @@ characters, ASCII whitespace characters, other ASCII characters and non-ASCII.")
|
||||||
(lambda (input)
|
(lambda (input)
|
||||||
(string-append
|
(string-append
|
||||||
(assoc-ref inputs input) "/bin"))
|
(assoc-ref inputs input) "/bin"))
|
||||||
'("alsa-utils" "coreutils" "curl" "dbus"
|
'("coreutils" "curl" "ibus" "iproute2" "kdeconnect"
|
||||||
"ibus" "iproute" "kdeconnect" "lm-sensors"
|
"xdg-utils" "zlib"))))
|
||||||
"pulseaudio" "openssl" "setxkbmap"
|
|
||||||
"speedtest-cli" "xdg-utils" "xrandr"
|
|
||||||
"zlib"))))
|
|
||||||
(wrap-program (string-append out "/bin/i3status-rs")
|
(wrap-program (string-append out "/bin/i3status-rs")
|
||||||
`("PATH" prefix ,paths))))))))
|
`("PATH" prefix ,paths))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list pkg-config))
|
(list pkg-config))
|
||||||
(inputs
|
(inputs
|
||||||
`(("alsa-utils" ,alsa-utils)
|
(list alsa-utils
|
||||||
("bash-minimal" ,bash-minimal)
|
bash-minimal
|
||||||
("coreutils" ,coreutils)
|
coreutils
|
||||||
("curl" ,curl)
|
curl
|
||||||
("dbus" ,dbus)
|
dbus
|
||||||
("ibus" ,ibus)
|
ibus
|
||||||
("iproute" ,iproute)
|
iproute
|
||||||
("kdeconnect" ,kdeconnect)
|
kdeconnect
|
||||||
("lm-sensors" ,lm-sensors "lib")
|
(list lm-sensors "lib")
|
||||||
("pulseaudio" ,pulseaudio)
|
pulseaudio
|
||||||
("openssl" ,openssl)
|
openssl
|
||||||
("setxkbmap" ,setxkbmap)
|
setxkbmap
|
||||||
("speedtest-cli" ,speedtest-cli)
|
speedtest-cli
|
||||||
("xdg-utils" ,xdg-utils)
|
xdg-utils
|
||||||
("xrandr" ,xrandr)
|
xrandr
|
||||||
("zlib" ,zlib)))
|
zlib))
|
||||||
(home-page "https://github.com/greshake/i3status-rust/")
|
(home-page "https://github.com/greshake/i3status-rust/")
|
||||||
(synopsis "Replacement for i3status, written in Rust")
|
(synopsis "Replacement for i3status, written in Rust")
|
||||||
(description "@code{i3status-rs} is a feature-rich and resource-friendly
|
(description "@code{i3status-rs} is a feature-rich and resource-friendly
|
||||||
|
|
Reference in a new issue