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