i3blocks-gaps: remove 'with lib;'
This commit is contained in:
parent
29918f97a4
commit
4a22744d12
@ -4,11 +4,9 @@
|
|||||||
"load_average" "memory" "volume" "wifi" ]
|
"load_average" "memory" "volume" "wifi" ]
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
perlscripts = [ "battery" "cpu_usage" "openvpn" "temperature" ];
|
perlscripts = [ "battery" "cpu_usage" "openvpn" "temperature" ];
|
||||||
contains_any = l1: l2: 0 < length( intersectLists l1 l2 );
|
contains_any = l1: l2: 0 < lib.length( lib.intersectLists l1 l2 );
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -25,24 +23,24 @@ stdenv.mkDerivation rec {
|
|||||||
makeFlags = [ "all" ];
|
makeFlags = [ "all" ];
|
||||||
installFlags = [ "PREFIX=\${out}" "VERSION=${version}" ];
|
installFlags = [ "PREFIX=\${out}" "VERSION=${version}" ];
|
||||||
|
|
||||||
buildInputs = optional (contains_any scripts perlscripts) perl;
|
buildInputs = lib.optional (contains_any scripts perlscripts) perl;
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postFixup = optionalString (elem "bandwidth" scripts) ''
|
postFixup = lib.optionalString (lib.elem "bandwidth" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/bandwidth \
|
wrapProgram $out/libexec/i3blocks/bandwidth \
|
||||||
--prefix PATH : ${makeBinPath [ iproute2 ]}
|
--prefix PATH : ${lib.makeBinPath [ iproute2 ]}
|
||||||
'' + optionalString (elem "battery" scripts) ''
|
'' + lib.optionalString (lib.elem "battery" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/battery \
|
wrapProgram $out/libexec/i3blocks/battery \
|
||||||
--prefix PATH : ${makeBinPath [ acpi ]}
|
--prefix PATH : ${lib.makeBinPath [ acpi ]}
|
||||||
'' + optionalString (elem "cpu_usage" scripts) ''
|
'' + lib.optionalString (lib.elem "cpu_usage" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/cpu_usage \
|
wrapProgram $out/libexec/i3blocks/cpu_usage \
|
||||||
--prefix PATH : ${makeBinPath [ sysstat ]}
|
--prefix PATH : ${lib.makeBinPath [ sysstat ]}
|
||||||
'' + optionalString (elem "iface" scripts) ''
|
'' + lib.optionalString (lib.elem "iface" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/iface \
|
wrapProgram $out/libexec/i3blocks/iface \
|
||||||
--prefix PATH : ${makeBinPath [ iproute2 ]}
|
--prefix PATH : ${lib.makeBinPath [ iproute2 ]}
|
||||||
'' + optionalString (elem "volume" scripts) ''
|
'' + lib.optionalString (lib.elem "volume" scripts) ''
|
||||||
wrapProgram $out/libexec/i3blocks/volume \
|
wrapProgram $out/libexec/i3blocks/volume \
|
||||||
--prefix PATH : ${makeBinPath [ alsa-utils ]}
|
--prefix PATH : ${lib.makeBinPath [ alsa-utils ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user