Files
nixpkgs/pkgs/by-name/sc/screenkey/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

76 lines
1.6 KiB
Nix

{
lib,
fetchFromGitLab,
wrapGAppsHook3,
xorg,
gobject-introspection,
gtk3,
libappindicator-gtk3,
slop,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "screenkey";
version = "1.5";
pyproject = true;
src = fetchFromGitLab {
owner = "screenkey";
repo = "screenkey";
rev = "v${version}";
hash = "sha256-kWktKzRyWHGd1lmdKhPwrJoSzAIN2E5TKyg30uhM4Ug=";
};
nativeBuildInputs = [
wrapGAppsHook3
# for setup hook
gobject-introspection
];
buildInputs = [
gtk3
libappindicator-gtk3
];
build-system = with python3.pkgs; [ setuptools ];
dependencies = 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;
pythonImportsCheck = [ "Screenkey" ];
# Fix CDLL python calls for non absolute paths of xorg libraries
postPatch = ''
substituteInPlace Screenkey/xlib.py \
--replace-fail libX11.so.6 ${lib.getLib xorg.libX11}/lib/libX11.so.6 \
--replace-fail 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";
};
}