2018-01-22 20:18:26 +00:00
|
|
|
{ lib
|
2020-08-14 17:52:58 +01:00
|
|
|
, fetchFromGitLab
|
|
|
|
# native
|
2018-01-22 20:18:26 +00:00
|
|
|
, intltool
|
|
|
|
, wrapGAppsHook
|
2020-08-14 17:52:58 +01:00
|
|
|
, file
|
|
|
|
# not native
|
|
|
|
, xorg
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, python3
|
2018-01-22 20:18:26 +00:00
|
|
|
}:
|
2020-08-14 17:52:58 +01:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2018-01-22 20:18:26 +00:00
|
|
|
pname = "screenkey";
|
2020-08-14 17:52:58 +01:00
|
|
|
version = "1.2";
|
2018-01-22 20:18:26 +00:00
|
|
|
|
2020-08-14 17:52:58 +01:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "screenkey";
|
2018-01-22 20:18:26 +00:00
|
|
|
repo = "screenkey";
|
2020-08-14 17:52:58 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1x13n57iy2pg3h3r994q3g5nbmh2gwk3qidmmcv0g7qa89n2gwbj";
|
2018-01-22 20:18:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2020-08-14 17:52:58 +01:00
|
|
|
python3.pkgs.distutils_extra
|
|
|
|
# Shouldn't be needed once https://gitlab.com/screenkey/screenkey/-/issues/122 is fixed.
|
2018-01-22 20:18:26 +00:00
|
|
|
intltool
|
2020-08-14 17:52:58 +01:00
|
|
|
# We are not sure why is this needed, but without it we get "file: command
|
|
|
|
# not found" errors during build.
|
|
|
|
file
|
2018-01-22 20:18:26 +00:00
|
|
|
wrapGAppsHook
|
2020-08-14 17:52:58 +01:00
|
|
|
# for setup hook
|
|
|
|
gobject-introspection
|
2018-01-22 20:18:26 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-08-14 17:52:58 +01:00
|
|
|
gtk3
|
2018-01-22 20:18:26 +00:00
|
|
|
];
|
|
|
|
|
2020-08-14 17:52:58 +01:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
2018-01-22 20:18:26 +00:00
|
|
|
];
|
|
|
|
|
2020-08-14 17:52:58 +01:00
|
|
|
# Prevent double wrapping because of wrapGAppsHook
|
|
|
|
dontWrapGApps = true;
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/56943
|
|
|
|
strictDeps = false;
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2018-01-22 20:18:26 +00:00
|
|
|
# screenkey does not have any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-08-14 17:52:58 +01:00
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
2018-01-22 20:18:26 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.thregr.org/~wavexx/software/screenkey/";
|
2018-01-22 20:18:26 +00:00
|
|
|
description = "A screencast tool to display your keys inspired by Screenflick";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.rasendubi ];
|
|
|
|
};
|
|
|
|
}
|