1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 03:25:02 +00:00
nixpkgs/pkgs/applications/misc/rofi/wrapper.nix

25 lines
634 B
Nix
Raw Normal View History

{ stdenv, rofi-unwrapped, makeWrapper, theme ? null }:
if theme == null then rofi-unwrapped else
stdenv.mkDerivation {
pname = "rofi";
version = rofi-unwrapped.version;
buildInputs = [ makeWrapper ];
preferLocalBuild = true;
passthru.unwrapped = rofi-unwrapped;
buildCommand = ''
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 // {
priority = (rofi-unwrapped.meta.priority or 0) - 1;
};
}