about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/i3/blocks.nix
diff options
context:
space:
mode:
authorilikeavocadoes <36193715+ilikeavocadoes@users.noreply.github.com>2019-04-07 17:56:33 +0300
committerxeji <36407913+xeji@users.noreply.github.com>2019-04-07 16:56:33 +0200
commitc034fb3c9964250fb8e1543277e7639738036d08 (patch)
tree3091fc2503d3dff11210a39e5e8b569abee24a99 /pkgs/applications/window-managers/i3/blocks.nix
parent940679a41bb8a9d1a3811e2a50ad16db2cd7ea0b (diff)
downloadnixlib-c034fb3c9964250fb8e1543277e7639738036d08.tar
nixlib-c034fb3c9964250fb8e1543277e7639738036d08.tar.gz
nixlib-c034fb3c9964250fb8e1543277e7639738036d08.tar.bz2
nixlib-c034fb3c9964250fb8e1543277e7639738036d08.tar.lz
nixlib-c034fb3c9964250fb8e1543277e7639738036d08.tar.xz
nixlib-c034fb3c9964250fb8e1543277e7639738036d08.tar.zst
nixlib-c034fb3c9964250fb8e1543277e7639738036d08.zip
i3blocks: 1.4 -> unstable-2019-05-07 (#59099)
Diffstat (limited to 'pkgs/applications/window-managers/i3/blocks.nix')
-rw-r--r--pkgs/applications/window-managers/i3/blocks.nix51
1 files changed, 8 insertions, 43 deletions
diff --git a/pkgs/applications/window-managers/i3/blocks.nix b/pkgs/applications/window-managers/i3/blocks.nix
index 88bf7762dd87..bd088db8a366 100644
--- a/pkgs/applications/window-managers/i3/blocks.nix
+++ b/pkgs/applications/window-managers/i3/blocks.nix
@@ -1,54 +1,19 @@
-{ fetchurl, stdenv, perl, makeWrapper
-, iproute, acpi, sysstat, xset, playerctl
-, cmus, openvpn, lm_sensors, alsaUtils
-, scripts ? [ "bandwidth" "battery" "cpu_usage" "disk" "iface"
-              "keyindicator" "load_average" "mediaplayer" "memory"
-	            "openvpn" "temperature" "volume" "wifi" ]
-}:
+{ fetchFromGitHub, stdenv, autoreconfHook }:
 
 with stdenv.lib;
 
-let
-  perlscripts = [ "battery" "cpu_usage" "keyindicator"
-                  "mediaplayer" "openvpn" "temperature" ];
-  contains_any = l1: l2: 0 < length( intersectLists l1 l2 );
-
-in
 stdenv.mkDerivation rec {
   name = "i3blocks-${version}";
-  version = "1.4";
+  version = "unstable-2019-02-07";
 
-  src = fetchurl {
-    url = "https://github.com/vivien/i3blocks/releases/download/${version}/${name}.tar.gz";
-    sha256 = "c64720057e22cc7cac5e8fcd58fd37e75be3a7d5a3cb8995841a7f18d30c0536";
+  src = fetchFromGitHub {
+    owner = "vivien";
+    repo = "i3blocks";
+    rev = "ec050e79ad8489a6f8deb37d4c20ab10729c25c3";
+    sha256 = "1fx4230lmqa5rpzph68dwnpcjfaaqv5gfkradcr85hd1z8d1qp1b";
   };
 
-  buildFlags = "SYSCONFDIR=/etc all";
-  installFlags = "PREFIX=\${out} VERSION=${version}";
-
-  buildInputs = optional (contains_any scripts perlscripts) perl;
-  nativeBuildInputs = [ makeWrapper ];
-
-  postFixup = ''
-    wrapProgram $out/libexec/i3blocks/bandwidth \
-      --prefix PATH : ${makeBinPath (optional (elem "bandwidth" scripts) iproute)}
-    wrapProgram $out/libexec/i3blocks/battery \
-      --prefix PATH : ${makeBinPath (optional (elem "battery" scripts) acpi)}
-    wrapProgram $out/libexec/i3blocks/cpu_usage \
-      --prefix PATH : ${makeBinPath (optional (elem "cpu_usage" scripts) sysstat)}
-    wrapProgram $out/libexec/i3blocks/iface \
-      --prefix PATH : ${makeBinPath (optional (elem "iface" scripts) iproute)}
-    wrapProgram $out/libexec/i3blocks/keyindicator \
-      --prefix PATH : ${makeBinPath (optional (elem "keyindicator" scripts) xset)}
-    wrapProgram $out/libexec/i3blocks/mediaplayer \
-      --prefix PATH : ${makeBinPath (optionals (elem "mediaplayer" scripts) [playerctl cmus])}
-    wrapProgram $out/libexec/i3blocks/openvpn \
-      --prefix PATH : ${makeBinPath (optional (elem "openvpn" scripts) openvpn)}
-    wrapProgram $out/libexec/i3blocks/temperature \
-      --prefix PATH : ${makeBinPath (optional (elem "temperature" scripts) lm_sensors)}
-    wrapProgram $out/libexec/i3blocks/volume \
-      --prefix PATH : ${makeBinPath (optional (elem "volume" scripts) alsaUtils)}
-  '';
+  nativeBuildInputs = [ autoreconfHook ];
 
   meta = {
     description = "A flexible scheduler for your i3bar blocks";