fix rofi wrapper only passing along binary

This commit is contained in:
Silvan Mosberger 2018-06-11 21:30:36 +02:00
parent d1a2853933
commit 06673cba31
No known key found for this signature in database
GPG Key ID: 9424360B4B85C9E7

View File

@ -1,14 +1,19 @@
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }:
if theme == null then rofi-unwrapped else
stdenv.mkDerivation {
name = "rofi-${rofi-unwrapped.version}";
buildInputs = [ makeWrapper ];
preferLocalBuild = true;
passthru = { unwrapped = rofi-unwrapped; };
passthru.unwrapped = rofi-unwrapped;
buildCommand = ''
mkdir -p $out/bin
ln -s ${rofi-unwrapped}/bin/rofi $out/bin/rofi
${lib.optionalString (theme != null) ''wrapProgram $out/bin/rofi --add-flags "-theme ${theme}"''}
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}"
'';
meta = rofi-unwrapped.meta // {