2018-03-11 01:37:59 +00:00
|
|
|
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }:
|
|
|
|
|
2018-06-11 19:30:36 +00:00
|
|
|
if theme == null then rofi-unwrapped else
|
2018-03-11 01:37:59 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "rofi-${rofi-unwrapped.version}";
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
preferLocalBuild = true;
|
2018-06-11 19:30:36 +00:00
|
|
|
passthru.unwrapped = rofi-unwrapped;
|
2018-03-11 01:37:59 +00:00
|
|
|
buildCommand = ''
|
2018-06-11 19:30:36 +00: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 01:37:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = rofi-unwrapped.meta // {
|
|
|
|
priority = (rofi-unwrapped.meta.priority or 0) - 1;
|
|
|
|
};
|
|
|
|
}
|