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
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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
|
2022-11-21 17:40:18 +00:00
|
|
|
, libX11
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "ulauncher";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.15.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Ulauncher/Ulauncher/releases/download/${version}/ulauncher_${version}.tar.gz";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-YgOw3Gyy/o8qorWAnAlQrAZ2ZTnyP3PagLs2Qkdg788=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3Packages; [
|
2023-10-19 13:55:26 +00:00
|
|
|
distutils-extra
|
2022-10-21 18:38:19 +00:00
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
intltool
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2021-12-06 16:07:01 +00:00
|
|
|
gdk-pixbuf
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
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
|
|
|
|
dbus-python
|
|
|
|
pygobject3
|
|
|
|
pyinotify
|
2023-01-20 10:41:00 +00:00
|
|
|
levenshtein
|
2020-04-24 23:36:52 +00:00
|
|
|
pyxdg
|
2021-12-06 16:07:01 +00:00
|
|
|
pycairo
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
2024-06-05 15:53:02 +00:00
|
|
|
semver
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3Packages; [
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
|
|
|
./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 \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail 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 ]}"
|
2022-11-21 17:40:18 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libX11 ]}"
|
|
|
|
--prefix WEBKIT_DISABLE_COMPOSITING_MODE : "1"
|
2021-12-06 16:07:01 +00:00
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
passthru = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Fast application launcher for Linux, written in Python, using GTK";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://ulauncher.io/";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ aaronjanse sebtm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|