about summary refs log tree commit diff
path: root/pkgs/applications/window-managers/yabar/default.nix
blob: 2f4a7f0e06c5d17e57bb48d732aeafc95fdbe0ac (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig, xcbutilwm }:

stdenv.mkDerivation rec {
  name    = "yabar-${version}";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner  = "geommer";
    repo   = "yabar";
    rev    = "746387f0112f9b7aa2e2e27b3d69cb2892d8c63b";
    sha256 = "1nw9dar1caqln5fr0dqk7dg6naazbpfwwzxwlkxz42shsc3w30a6";
  };

  buildInputs = [ cairo gdk_pixbuf libconfig pango pkgconfig xcbutilwm ];

  postPatch = ''
    substituteInPlace ./Makefile --replace "\$(shell git describe)" "${version}"
  '';

  buildPhase = ''
    make DESTDIR=$out PREFIX=/
  '';

  installPhase = ''
    make DESTDIR=$out PREFIX=/ install
    mkdir -p $out/share/yabar/examples
    cp -v examples/*.config $out/share/yabar/examples
  '';

  meta = with stdenv.lib; {
    description = "A modern and lightweight status bar for X window managers";
    homepage    = "https://github.com/geommer/yabar";
    maintainers = [ maintainers.hiberno ];
    license     = licenses.mit;
    platforms   = platforms.linux;
  };
}