2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2020-08-20 17:08:02 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3Packages
|
|
|
|
, gdk-pixbuf
|
|
|
|
, glib
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnome
|
2020-04-24 23:36:52 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, wrapGAppsHook
|
|
|
|
, webkitgtk
|
|
|
|
, libnotify
|
|
|
|
, keybinder3
|
|
|
|
, libappindicator
|
|
|
|
, intltool
|
|
|
|
, wmctrl
|
2021-05-20 23:08:51 +00:00
|
|
|
, xvfb-run
|
2020-04-24 23:36:52 +00:00
|
|
|
, librsvg
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "ulauncher";
|
2021-09-22 15:38:15 +00:00
|
|
|
version = "5.12.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Ulauncher/Ulauncher/releases/download/${version}/ulauncher_${version}.tar.gz";
|
2021-09-22 15:38:15 +00:00
|
|
|
sha256 = "sha256-Fd3IOCEeXGV8zGd/8SzrWRsSsZRVePnsDaX8WrBrCOQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3Packages; [
|
|
|
|
distutils_extra
|
2022-10-21 18:38:19 +00:00
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
intltool
|
|
|
|
wrapGAppsHook
|
2021-12-06 16:07:01 +00:00
|
|
|
gdk-pixbuf
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gdk-pixbuf
|
|
|
|
glib
|
2021-05-20 23:08:51 +00:00
|
|
|
gnome.adwaita-icon-theme
|
2020-04-24 23:36:52 +00:00
|
|
|
gtk3
|
|
|
|
keybinder3
|
|
|
|
libappindicator
|
|
|
|
libnotify
|
|
|
|
librsvg
|
|
|
|
webkitgtk
|
|
|
|
wmctrl
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
mock
|
|
|
|
mypy
|
|
|
|
mypy-extensions
|
|
|
|
dbus-python
|
|
|
|
pygobject3
|
|
|
|
pyinotify
|
|
|
|
python-Levenshtein
|
|
|
|
pyxdg
|
2021-12-06 16:07:01 +00:00
|
|
|
pycairo
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
mock
|
|
|
|
pytest
|
|
|
|
pytest-mock
|
2021-05-20 23:08:51 +00:00
|
|
|
xvfb-run
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./fix-path.patch
|
|
|
|
./0001-Adjust-get_data_path-for-NixOS.patch
|
|
|
|
./fix-extensions.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py --subst-var out
|
2021-09-18 10:52:07 +00:00
|
|
|
patchShebangs bin/ulauncher-toggle
|
|
|
|
substituteInPlace bin/ulauncher-toggle \
|
|
|
|
--replace wmctrl ${wmctrl}/bin/wmctrl
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# https://github.com/Ulauncher/Ulauncher/issues/390
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
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' \
|
2020-12-25 13:55:36 +00:00
|
|
|
pytest -k 'not TestPath and not test_handle_key_press_event' tests
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# do not double wrap
|
|
|
|
dontWrapGApps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
preFixup = ''
|
2021-12-06 16:07:01 +00:00
|
|
|
makeWrapperArgs+=(
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ wmctrl ]}"
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A fast application launcher for Linux, written in Python, using GTK";
|
|
|
|
homepage = "https://ulauncher.io/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ aaronjanse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|