nixpkgs/pkgs/applications/window-managers/yabar/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig
, xcbutilwm, alsaLib, wirelesstools, asciidoc, libxslt, makeWrapper
, configFile ? null, lib
}:
2016-06-02 06:42:35 +00:00
stdenv.mkDerivation rec {
name = "yabar-${version}";
version = "2017-09-09";
2016-06-02 06:42:35 +00:00
src = fetchFromGitHub {
owner = "geommer";
repo = "yabar";
rev = "d3934344ba27f5bdf122bf74daacee6d49284dab";
sha256 = "14zrlzva8i83ffg426mrf6yli8afwq6chvc7yi78ngixyik5gzhx";
2016-06-02 06:42:35 +00:00
};
buildInputs = [
cairo gdk_pixbuf libconfig pango pkgconfig xcbutilwm
alsaLib wirelesstools asciidoc libxslt makeWrapper
];
2016-08-02 15:30:50 +00:00
2016-06-02 06:42:35 +00:00
postPatch = ''
substituteInPlace ./Makefile \
--replace "\$(shell git describe)" "${version}" \
--replace "a2x" "${asciidoc}/bin/a2x --no-xmllint"
2016-06-02 06:42:35 +00:00
'';
makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
2016-06-02 06:42:35 +00:00
postInstall = ''
2016-06-02 06:42:35 +00:00
mkdir -p $out/share/yabar/examples
cp -v examples/*.config $out/share/yabar/examples
${lib.optionalString (configFile != null)
''
wrapProgram "$out/bin/yabar" \
--add-flags "-c ${configFile}"
''
}
2016-06-02 06:42:35 +00:00
'';
meta = with stdenv.lib; {
description = "A modern and lightweight status bar for X window managers";
homepage = https://github.com/geommer/yabar;
2016-06-02 06:42:35 +00:00
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ ma27 ];
2016-06-02 06:42:35 +00:00
};
}