nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
fork

Configure Feed

Select the types of activity you want to include in your feed.

at devShellTools-shell 136 lines 2.8 kB view raw
1{ 2 lib, 3 fetchurl, 4 nix-update-script, 5 python3Packages, 6 gdk-pixbuf, 7 glib, 8 adwaita-icon-theme, 9 gobject-introspection, 10 gtk3, 11 wrapGAppsHook3, 12 webkitgtk_4_0, 13 libnotify, 14 keybinder3, 15 libappindicator, 16 intltool, 17 wmctrl, 18 xvfb-run, 19 librsvg, 20 libX11, 21}: 22 23python3Packages.buildPythonApplication rec { 24 pname = "ulauncher"; 25 version = "5.15.7"; 26 pyproject = true; 27 28 src = fetchurl { 29 url = "https://github.com/Ulauncher/Ulauncher/releases/download/${version}/ulauncher_${version}.tar.gz"; 30 hash = "sha256-YgOw3Gyy/o8qorWAnAlQrAZ2ZTnyP3PagLs2Qkdg788="; 31 }; 32 33 nativeBuildInputs = [ 34 gobject-introspection 35 intltool 36 wrapGAppsHook3 37 gdk-pixbuf 38 ]; 39 40 buildInputs = [ 41 glib 42 adwaita-icon-theme 43 gtk3 44 keybinder3 45 libappindicator 46 libnotify 47 librsvg 48 webkitgtk_4_0 49 wmctrl 50 ]; 51 52 build-system = with python3Packages; [ 53 setuptools 54 distutils-extra 55 ]; 56 57 dependencies = with python3Packages; [ 58 mock 59 dbus-python 60 pygobject3 61 pyinotify 62 levenshtein 63 pyxdg 64 pycairo 65 requests 66 semver 67 websocket-client 68 ]; 69 70 nativeCheckInputs = with python3Packages; [ 71 mock 72 pytest 73 pytest-mock 74 xvfb-run 75 ]; 76 77 patches = [ 78 ./fix-path.patch 79 ./fix-extensions.patch 80 ]; 81 82 postPatch = '' 83 substituteInPlace setup.py --subst-var out 84 patchShebangs bin/ulauncher-toggle 85 substituteInPlace bin/ulauncher-toggle \ 86 --replace-fail wmctrl ${wmctrl}/bin/wmctrl 87 ''; 88 89 # https://github.com/Ulauncher/Ulauncher/issues/390 90 doCheck = false; 91 92 preCheck = '' 93 export PYTHONPATH=$PYTHONPATH:$out/${python3Packages.python.sitePackages} 94 ''; 95 96 # Simple translation of 97 # - https://github.com/Ulauncher/Ulauncher/blob/f5a601bdca75198a6a31b9d84433496b63530e74/test 98 checkPhase = '' 99 runHook preCheck 100 101 # skip tests in invocation that handle paths that 102 # aren't nix friendly (i think) 103 xvfb-run -s '-screen 0 1024x768x16' \ 104 pytest -k 'not TestPath and not test_handle_key_press_event' tests 105 106 runHook postCheck 107 ''; 108 109 pythonImportsCheck = [ "ulauncher" ]; 110 111 # do not double wrap 112 dontWrapGApps = true; 113 preFixup = '' 114 makeWrapperArgs+=( 115 "''${gappsWrapperArgs[@]}" 116 --prefix PATH : "${lib.makeBinPath [ wmctrl ]}" 117 --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libX11 ]}" 118 --prefix WEBKIT_DISABLE_COMPOSITING_MODE : "1" 119 ) 120 ''; 121 122 passthru = { 123 updateScript = nix-update-script { }; 124 }; 125 126 meta = with lib; { 127 description = "Fast application launcher for Linux, written in Python, using GTK"; 128 homepage = "https://ulauncher.io/"; 129 license = licenses.gpl3; 130 platforms = platforms.linux; 131 mainProgram = "ulauncher"; 132 maintainers = with maintainers; [ 133 aaronjanse 134 ]; 135 }; 136}