nixpkgs-suyu/pkgs/applications/misc/ulauncher/default.nix

115 lines
2.3 KiB
Nix
Raw Normal View History

{ stdenv
, fetchurl
2020-03-27 21:47:10 +01:00
, python3Packages
, gdk-pixbuf
, glib
, gnome3
, gobject-introspection
2020-03-27 21:47:10 +01:00
, gtk3
, wrapGAppsHook
, webkitgtk
, libnotify
, keybinder3
, libappindicator
, intltool
, wmctrl
, xvfb_run
2020-03-27 21:47:10 +01:00
, librsvg
}:
2020-03-27 21:47:10 +01:00
python3Packages.buildPythonApplication rec {
pname = "ulauncher";
2020-03-27 21:47:10 +01:00
version = "5.6.1";
2020-03-27 21:47:10 +01:00
disabled = python3Packages.isPy27;
src = fetchurl {
url = "https://github.com/Ulauncher/Ulauncher/releases/download/${version}/ulauncher_${version}.tar.gz";
2020-03-27 21:47:10 +01:00
sha256 = "14k68lp58wldldhaq4cf0ffkhi81czv4ps9xa86iw1j5b1gd2vbl";
};
2020-03-27 21:47:10 +01:00
nativeBuildInputs = with python3Packages; [
distutils_extra
intltool
wrapGAppsHook
];
buildInputs = [
2020-03-27 21:47:10 +01:00
gdk-pixbuf
glib
gnome3.adwaita-icon-theme
gobject-introspection
2020-03-27 21:47:10 +01:00
gtk3
keybinder3
libappindicator
libnotify
2020-03-27 21:47:10 +01:00
librsvg
webkitgtk
wmctrl
];
2020-03-27 21:47:10 +01:00
propagatedBuildInputs = with python3Packages; [
mock
mypy
mypy-extensions
dbus-python
pygobject3
pyinotify
python-Levenshtein
pyxdg
2020-03-27 21:47:10 +01:00
requests
websocket_client
];
2020-03-27 21:47:10 +01:00
checkInputs = with python3Packages; [
mock
2019-07-13 11:27:00 +02:00
pytest
pytest-mock
pytestpep8
xvfb_run
];
patches = [
./fix-path.patch
2020-03-27 21:47:10 +01:00
./fix-permissions.patch # ulauncher PR #523
./0001-Adjust-get_data_path-for-NixOS.patch
./fix-extensions.patch
];
postPatch = ''
substituteInPlace setup.py --subst-var out
'';
# https://github.com/Ulauncher/Ulauncher/issues/390
doCheck = false;
preCheck = ''
2020-03-27 21:47:10 +01:00
export PYTHONPATH=$PYTHONPATH:$out/${python3Packages.python.sitePackages}
'';
# Simple translation of
# - https://github.com/Ulauncher/Ulauncher/blob/f5a601bdca75198a6a31b9d84433496b63530e74/test
checkPhase = ''
runHook preCheck
# skip tests in invocation that handle paths that
# aren't nix friendly (i think)
xvfb-run -s '-screen 0 1024x768x16' \
pytest -k 'not TestPath and not test_handle_key_press_event' --pep8 tests
runHook postCheck
'';
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : "${stdenv.lib.makeBinPath [ wmctrl ]}")
'';
meta = with stdenv.lib; {
description = "A fast application launcher for Linux, written in Python, using GTK";
homepage = https://ulauncher.io/;
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ aaronjanse worldofpeace ];
};
}