nixpkgs/pkgs/applications/video/screenkey/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

70 lines
1.5 KiB
Nix

{ lib
, fetchFromGitLab
, wrapGAppsHook3
, xorg
, gobject-introspection
, gtk3
, libappindicator-gtk3
, slop
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "screenkey";
version = "1.5";
src = fetchFromGitLab {
owner = pname;
repo = pname;
rev = "v${version}";
hash = "sha256-kWktKzRyWHGd1lmdKhPwrJoSzAIN2E5TKyg30uhM4Ug=";
};
nativeBuildInputs = [
wrapGAppsHook3
# for setup hook
gobject-introspection
];
buildInputs = [
gtk3
libappindicator-gtk3
];
propagatedBuildInputs = with python3.pkgs; [
babel
pycairo
pygobject3
dbus-python
];
# Prevent double wrapping because of wrapGAppsHook3
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
--prefix PATH ":" "${lib.makeBinPath [ slop ]}"
"''${gappsWrapperArgs[@]}"
)
'';
# screenkey does not have any tests
doCheck = false;
# Fix CDLL python calls for non absolute paths of xorg libraries
postPatch = ''
substituteInPlace Screenkey/xlib.py \
--replace libX11.so.6 ${lib.getLib xorg.libX11}/lib/libX11.so.6 \
--replace libXtst.so.6 ${lib.getLib xorg.libXtst}/lib/libXtst.so.6
'';
meta = with lib; {
homepage = "https://www.thregr.org/~wavexx/software/screenkey/";
description = "Screencast tool to display your keys inspired by Screenflick";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = [ maintainers.rasendubi ];
mainProgram = "screenkey";
};
}