Merge pull request #41860 from Infinisil/fix/rofi-wrapper

fix rofi wrapper only passing along binary
This commit is contained in:
Michael Raskin 2018-06-11 19:47:09 +00:00 committed by GitHub
commit 40eb14c972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 // {