1{
2 fetchFromGitHub,
3 fetchpatch,
4 lib,
5 stdenv,
6 autoreconfHook,
7 pkg-config,
8}:
9
10stdenv.mkDerivation {
11 pname = "i3blocks";
12 version = "1.5";
13
14 src = fetchFromGitHub {
15 owner = "vivien";
16 repo = "i3blocks";
17 rev = "3417602a2d8322bc866861297f535e1ef80b8cb0";
18 sha256 = "0v8mwnm8qzpv6xnqvrk43s4b9iyld4naqzbaxk4ldq1qkhai0wsv";
19 };
20
21 patches = [
22 # XDG_CONFIG_DIRS can contain multiple elements separated by colons, which should be searched in order.
23 (fetchpatch {
24 # https://github.com/vivien/i3blocks/pull/405
25 url = "https://github.com/edef1c/i3blocks/commit/d57b32f9a364aeaf36869efdd54240433c737e57.patch";
26 sha256 = "102xb0ax0hmg82dz2gzfag470dkckzf2yizai0izacvrz0d3ngj1";
27 })
28 ];
29
30 nativeBuildInputs = [
31 autoreconfHook
32 pkg-config
33 ];
34
35 meta = with lib; {
36 description = "Flexible scheduler for your i3bar blocks";
37 mainProgram = "i3blocks";
38 homepage = "https://github.com/vivien/i3blocks";
39 license = licenses.gpl3;
40 platforms = with platforms; freebsd ++ linux;
41 };
42}