2019-12-23 03:37:08 +01:00
|
|
|
{ stdenv, rofi-unwrapped, makeWrapper, hicolor-icon-theme, theme ? null }:
|
2018-03-11 02:37:59 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2019-07-08 16:22:13 +02:00
|
|
|
pname = "rofi";
|
|
|
|
version = rofi-unwrapped.version;
|
|
|
|
|
2018-03-11 02:37:59 +01:00
|
|
|
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
|
2019-12-23 03:37:08 +01:00
|
|
|
|
2018-06-11 21:30:36 +02:00
|
|
|
rm $out/bin/rofi
|
2019-12-23 03:37:08 +01:00
|
|
|
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi \
|
|
|
|
--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
|
|
|
|
${if theme != null then ''--add-flags "-theme ${theme}"'' else ""}
|
|
|
|
|
|
|
|
rm $out/bin/rofi-theme-selector
|
|
|
|
makeWrapper ${rofi-unwrapped}/bin/rofi-theme-selector $out/bin/rofi-theme-selector \
|
|
|
|
--prefix XDG_DATA_DIRS : $out/share
|
2018-03-11 02:37:59 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = rofi-unwrapped.meta // {
|
|
|
|
priority = (rofi-unwrapped.meta.priority or 0) - 1;
|
|
|
|
};
|
|
|
|
}
|