yabar: add optional configFile
value to derivation
This commit is contained in:
parent
0761e74c38
commit
12e79f1358
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig
|
{ stdenv, fetchFromGitHub, cairo, gdk_pixbuf, libconfig, pango, pkgconfig
|
||||||
, xcbutilwm, alsaLib, wirelesstools, asciidoc, libxslt
|
, xcbutilwm, alsaLib, wirelesstools, asciidoc, libxslt, makeWrapper
|
||||||
|
, configFile ? null, lib
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -15,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cairo gdk_pixbuf libconfig pango pkgconfig xcbutilwm
|
cairo gdk_pixbuf libconfig pango pkgconfig xcbutilwm
|
||||||
alsaLib wirelesstools asciidoc libxslt
|
alsaLib wirelesstools asciidoc libxslt makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -29,6 +30,13 @@ stdenv.mkDerivation rec {
|
|||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $out/share/yabar/examples
|
mkdir -p $out/share/yabar/examples
|
||||||
cp -v examples/*.config $out/share/yabar/examples
|
cp -v examples/*.config $out/share/yabar/examples
|
||||||
|
|
||||||
|
${lib.optionalString (configFile != null)
|
||||||
|
''
|
||||||
|
wrapProgram "$out/bin/yabar" \
|
||||||
|
--add-flags "-c ${configFile}"
|
||||||
|
''
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user