2019-03-16 21:17:03 +03:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
2020-07-29 19:33:39 +03:00
|
|
|
, nix-update-script
|
2020-03-27 23:47:10 +03:00
|
|
|
, python3Packages
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
2019-03-16 21:17:03 +03:00
|
|
|
, gnome3
|
|
|
|
, gobject-introspection
|
2020-03-27 23:47:10 +03:00
|
|
|
, gtk3
|
2019-03-16 21:17:03 +03:00
|
|
|
, wrapGAppsHook
|
|
|
|
, webkitgtk
|
|
|
|
, libnotify
|
|
|
|
, keybinder3
|
|
|
|
, libappindicator
|
|
|
|
, intltool
|
|
|
|
, wmctrl
|
|
|
|
, xvfb_run
|
2020-03-27 23:47:10 +03:00
|
|
|
, librsvg
|
2019-03-16 21:17:03 +03:00
|
|
|
}:
|
|
|
|
|
2020-04-14 00:46:38 +03:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-03-16 21:17:03 +03:00
|
|
|
pname = "ulauncher";
|
2020-11-15 23:23:39 +03:00
|
|
|
version = "5.8.1";
|
2019-03-16 21:17:03 +03:00
|
|
|
|
2020-03-27 23:47:10 +03:00
|
|
|
disabled = python3Packages.isPy27;
|
2019-03-16 21:17:03 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Ulauncher/Ulauncher/releases/download/${version}/ulauncher_${version}.tar.gz";
|
2020-11-15 23:23:39 +03:00
|
|
|
sha256 = "1hgzfiwfk3dd50jmp184y754ydzmfv22qcv7z40gxj6pc67ahx3r";
|
2019-03-16 21:17:03 +03:00
|
|
|
};
|
|
|
|
|
2020-04-14 00:46:38 +03:00
|
|
|
nativeBuildInputs = with python3Packages; [
|
2019-03-16 21:17:03 +03:00
|
|
|
distutils_extra
|
|
|
|
intltool
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-03-27 23:47:10 +03:00
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
2019-03-16 21:17:03 +03:00
|
|
|
gnome3.adwaita-icon-theme
|
|
|
|
gobject-introspection
|
2020-03-27 23:47:10 +03:00
|
|
|
gtk3
|
2019-03-16 21:17:03 +03:00
|
|
|
keybinder3
|
|
|
|
libappindicator
|
|
|
|
libnotify
|
2020-03-27 23:47:10 +03:00
|
|
|
librsvg
|
2019-03-16 21:17:03 +03:00
|
|
|
webkitgtk
|
|
|
|
wmctrl
|
|
|
|
];
|
|
|
|
|
2020-03-27 23:47:10 +03:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
mock
|
|
|
|
mypy
|
|
|
|
mypy-extensions
|
2019-03-16 21:17:03 +03:00
|
|
|
dbus-python
|
|
|
|
pygobject3
|
|
|
|
pyinotify
|
|
|
|
python-Levenshtein
|
|
|
|
pyxdg
|
2020-03-27 23:47:10 +03:00
|
|
|
requests
|
2019-03-16 21:17:03 +03:00
|
|
|
websocket_client
|
|
|
|
];
|
|
|
|
|
2020-03-27 23:47:10 +03:00
|
|
|
checkInputs = with python3Packages; [
|
2019-03-16 21:17:03 +03:00
|
|
|
mock
|
2019-07-13 12:27:00 +03:00
|
|
|
pytest
|
2019-03-16 21:17:03 +03:00
|
|
|
pytest-mock
|
|
|
|
xvfb_run
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-path.patch
|
2020-03-27 23:47:10 +03:00
|
|
|
./0001-Adjust-get_data_path-for-NixOS.patch
|
|
|
|
./fix-extensions.patch
|
2019-03-16 21:17:03 +03:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --subst-var out
|
|
|
|
'';
|
|
|
|
|
|
|
|
# https://github.com/Ulauncher/Ulauncher/issues/390
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preCheck = ''
|
2020-03-27 23:47:10 +03:00
|
|
|
export PYTHONPATH=$PYTHONPATH:$out/${python3Packages.python.sitePackages}
|
2019-03-16 21:17:03 +03:00
|
|
|
'';
|
|
|
|
|
|
|
|
# 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' \
|
2020-12-11 05:14:06 +03:00
|
|
|
pytest -k 'not TestPath and not test_handle_key_press_event' tests
|
2019-03-16 21:17:03 +03:00
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(--prefix PATH : "${stdenv.lib.makeBinPath [ wmctrl ]}")
|
|
|
|
'';
|
|
|
|
|
2020-07-29 19:33:39 +03:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-03-16 21:17:03 +03:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A fast application launcher for Linux, written in Python, using GTK";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://ulauncher.io/";
|
2019-03-16 21:17:03 +03:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ aaronjanse worldofpeace ];
|
|
|
|
};
|
|
|
|
}
|