2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null }:
|
2018-03-11 02:37:59 +01:00
|
|
|
|
2018-06-11 21:30:36 +02:00
|
|
|
if theme == null then rofi-unwrapped else
|
2018-03-11 02:37:59 +01:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "rofi-${rofi-unwrapped.version}";
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
preferLocalBuild = true;
|
2018-06-11 21:30:36 +02:00
|
|
|
passthru.unwrapped = rofi-unwrapped;
|
2018-03-11 02:37:59 +01:00
|
|
|
buildCommand = ''
|
2018-06-11 21:30:36 +02:00
|
|
|
mkdir $out
|
|
|
|
ln -s ${rofi-unwrapped}/* $out
|
|
|
|
rm $out/bin
|
|
|
|
mkdir $out/bin
|
|
|
|
ln -s ${rofi-unwrapped}/bin/* $out/bin
|
|
|
|
rm $out/bin/rofi
|
|
|
|
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi --add-flags "-theme ${theme}"
|
2018-03-11 02:37:59 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = rofi-unwrapped.meta // {
|
|
|
|
priority = (rofi-unwrapped.meta.priority or 0) - 1;
|
|
|
|
};
|
|
|
|
}
|