nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 76 lines 1.6 kB view raw
1{ 2 lib, 3 fetchFromGitLab, 4 wrapGAppsHook3, 5 libxtst, 6 libx11, 7 gobject-introspection, 8 gtk3, 9 libappindicator-gtk3, 10 slop, 11 python3, 12}: 13 14python3.pkgs.buildPythonApplication rec { 15 pname = "screenkey"; 16 version = "1.5"; 17 pyproject = true; 18 19 src = fetchFromGitLab { 20 owner = "screenkey"; 21 repo = "screenkey"; 22 rev = "v${version}"; 23 hash = "sha256-kWktKzRyWHGd1lmdKhPwrJoSzAIN2E5TKyg30uhM4Ug="; 24 }; 25 26 nativeBuildInputs = [ 27 wrapGAppsHook3 28 # for setup hook 29 gobject-introspection 30 ]; 31 32 buildInputs = [ 33 gtk3 34 libappindicator-gtk3 35 ]; 36 37 build-system = with python3.pkgs; [ setuptools ]; 38 39 dependencies = with python3.pkgs; [ 40 babel 41 pycairo 42 pygobject3 43 dbus-python 44 ]; 45 46 # Prevent double wrapping because of wrapGAppsHook3 47 dontWrapGApps = true; 48 49 preFixup = '' 50 makeWrapperArgs+=( 51 --prefix PATH ":" "${lib.makeBinPath [ slop ]}" 52 "''${gappsWrapperArgs[@]}" 53 ) 54 ''; 55 56 # screenkey does not have any tests 57 doCheck = false; 58 59 pythonImportsCheck = [ "Screenkey" ]; 60 61 # Fix CDLL python calls for non absolute paths of xorg libraries 62 postPatch = '' 63 substituteInPlace Screenkey/xlib.py \ 64 --replace-fail libX11.so.6 ${lib.getLib libx11}/lib/libX11.so.6 \ 65 --replace-fail libXtst.so.6 ${lib.getLib libxtst}/lib/libXtst.so.6 66 ''; 67 68 meta = { 69 homepage = "https://www.thregr.org/~wavexx/software/screenkey/"; 70 description = "Screencast tool to display your keys inspired by Screenflick"; 71 license = lib.licenses.gpl3Plus; 72 platforms = lib.platforms.linux; 73 maintainers = [ ]; 74 mainProgram = "screenkey"; 75 }; 76}