nixpkgs/pkgs/applications/misc/rofi/default.nix
Matthew Bauer 5e2394ae3c rofi: only works on linux
(cherry picked from commit 568079277c5a8b6711db9ac0e3f4567bdffa8747)
2018-12-02 14:12:40 -06:00

43 lines
1.3 KiB
Nix

{ stdenv, fetchurl, autoreconfHook, pkgconfig, libxkbcommon, pango, which, git
, cairo, libxcb, xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification
, bison, flex, librsvg, check
}:
stdenv.mkDerivation rec {
version = "1.5.1";
name = "rofi-unwrapped-${version}";
src = fetchurl {
url = "https://github.com/DaveDavenport/rofi/releases/download/${version}/rofi-${version}.tar.gz";
sha256 = "1dc33zf33z38jcxb0lxpyd31waalpf6d4cd9z5f9m5qphdk1g679";
};
# config.patch may be removed in the future - https://github.com/DaveDavenport/rofi/pull/781
patches = [ ./config.patch ];
preConfigure = ''
patchShebangs "script"
# root not present in build /etc/passwd
sed -i 's/~root/~nobody/g' test/helper-expand.c
'';
postFixup = ''
substituteInPlace "$out"/bin/rofi-theme-selector \
--replace "%ROFIOUT%" "$out/share"
'';
nativeBuildInputs = [ autoreconfHook pkgconfig ];
buildInputs = [ libxkbcommon pango cairo git bison flex librsvg check
libstartup_notification libxcb xcbutil xcbutilwm xcbutilxrm which
];
doCheck = false;
meta = with stdenv.lib; {
description = "Window switcher, run dialog and dmenu replacement";
homepage = https://davedavenport.github.io/rofi;
license = licenses.mit;
maintainers = with maintainers; [ mbakke garbas ma27 ];
platforms = with platforms; linux;
};
}