2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null }:
|
2018-03-11 01:37:59 +00:00
|
|
|
|
2018-06-11 20:30:36 +01:00
|
|
|
if theme == null then rofi-unwrapped else
|
2018-03-11 01:37:59 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-07-08 15:22:13 +01:00
|
|
|
pname = "rofi";
|
|
|
|
version = rofi-unwrapped.version;
|
|
|
|
|
2018-03-11 01:37:59 +00:00
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
preferLocalBuild = true;
|
2018-06-11 20:30:36 +01:00
|
|
|
passthru.unwrapped = rofi-unwrapped;
|
2018-03-11 01:37:59 +00:00
|
|
|
buildCommand = ''
|
2018-06-11 20:30:36 +01: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;
|
|
|
|
};
|
|
|
|
}
|