2017-09-10 09:17:46 +00:00
|
|
|
{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig
|
2017-09-10 12:02:33 +00:00
|
|
|
, xcbutilwm, alsaLib, wirelesstools, asciidoc, libxslt, makeWrapper
|
|
|
|
, configFile ? null, lib
|
2017-09-10 09:17:46 +00:00
|
|
|
}:
|
2016-06-02 06:42:35 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "yabar-${version}";
|
2017-09-10 09:17:46 +00:00
|
|
|
version = "2017-09-09";
|
2016-06-02 06:42:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "geommer";
|
|
|
|
repo = "yabar";
|
2017-09-10 09:17:46 +00:00
|
|
|
rev = "d3934344ba27f5bdf122bf74daacee6d49284dab";
|
|
|
|
sha256 = "14zrlzva8i83ffg426mrf6yli8afwq6chvc7yi78ngixyik5gzhx";
|
2016-06-02 06:42:35 +00:00
|
|
|
};
|
|
|
|
|
2017-09-10 09:17:46 +00:00
|
|
|
buildInputs = [
|
|
|
|
cairo gdk_pixbuf libconfig pango pkgconfig xcbutilwm
|
2017-09-10 12:02:33 +00:00
|
|
|
alsaLib wirelesstools asciidoc libxslt makeWrapper
|
2017-09-10 09:17:46 +00:00
|
|
|
];
|
2016-08-02 15:30:50 +00:00
|
|
|
|
2016-06-02 06:42:35 +00:00
|
|
|
postPatch = ''
|
2017-09-10 09:17:46 +00:00
|
|
|
substituteInPlace ./Makefile \
|
|
|
|
--replace "\$(shell git describe)" "${version}" \
|
|
|
|
--replace "a2x" "${asciidoc}/bin/a2x --no-xmllint"
|
2016-06-02 06:42:35 +00:00
|
|
|
'';
|
|
|
|
|
2017-09-10 09:17:46 +00:00
|
|
|
makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" ];
|
2016-06-02 06:42:35 +00:00
|
|
|
|
2017-09-10 09:17:46 +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
|
2017-09-10 12:02:33 +00:00
|
|
|
|
|
|
|
${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";
|
2017-09-10 09:17:46 +00:00
|
|
|
homepage = https://github.com/geommer/yabar;
|
2016-06-02 06:42:35 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2017-09-10 09:17:46 +00:00
|
|
|
maintainers = with maintainers; [ ma27 ];
|
2016-06-02 06:42:35 +00:00
|
|
|
};
|
|
|
|
}
|