2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchFromGitLab
|
2020-04-24 23:36:52 +00:00
|
|
|
, wrapGAppsHook
|
2020-08-20 17:08:02 +00:00
|
|
|
, xorg
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
2022-12-02 08:20:57 +00:00
|
|
|
, libappindicator-gtk3
|
|
|
|
, slop
|
2020-08-20 17:08:02 +00:00
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "screenkey";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "1.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
src = fetchFromGitLab {
|
2022-12-02 08:20:57 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2020-08-20 17:08:02 +00:00
|
|
|
rev = "v${version}";
|
2022-12-02 08:20:57 +00:00
|
|
|
hash = "sha256-kWktKzRyWHGd1lmdKhPwrJoSzAIN2E5TKyg30uhM4Ug=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
2020-08-20 17:08:02 +00:00
|
|
|
# for setup hook
|
|
|
|
gobject-introspection
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-08-20 17:08:02 +00:00
|
|
|
gtk3
|
2022-12-02 08:20:57 +00:00
|
|
|
libappindicator-gtk3
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
2022-05-18 14:49:53 +00:00
|
|
|
babel
|
2020-08-20 17:08:02 +00:00
|
|
|
pycairo
|
|
|
|
pygobject3
|
2022-12-02 08:20:57 +00:00
|
|
|
dbus-python
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
# Prevent double wrapping because of wrapGAppsHook
|
|
|
|
dontWrapGApps = true;
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
preFixup = ''
|
2022-12-02 08:20:57 +00:00
|
|
|
makeWrapperArgs+=(
|
|
|
|
--prefix PATH ":" "${lib.makeBinPath [ slop ]}"
|
|
|
|
"''${gappsWrapperArgs[@]}"
|
|
|
|
)
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# screenkey does not have any tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2020-08-20 17:08:02 +00: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
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.thregr.org/~wavexx/software/screenkey/";
|
|
|
|
description = "A screencast tool to display your keys inspired by Screenflick";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.rasendubi ];
|
|
|
|
};
|
|
|
|
}
|