aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/video/screenkey
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/applications/video/screenkey
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/video/screenkey')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/video/screenkey/default.nix71
1 files changed, 71 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/video/screenkey/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/video/screenkey/default.nix
new file mode 100644
index 000000000000..00ead0f89a39
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/applications/video/screenkey/default.nix
@@ -0,0 +1,71 @@
+{ lib
+, fetchFromGitLab
+# native
+, intltool
+, wrapGAppsHook
+, file
+# not native
+, xorg
+, gobject-introspection
+, gtk3
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+ pname = "screenkey";
+ version = "1.2";
+
+ src = fetchFromGitLab {
+ owner = "screenkey";
+ repo = "screenkey";
+ rev = "v${version}";
+ sha256 = "1x13n57iy2pg3h3r994q3g5nbmh2gwk3qidmmcv0g7qa89n2gwbj";
+ };
+
+ nativeBuildInputs = [
+ python3.pkgs.distutils_extra
+ # Shouldn't be needed once https://gitlab.com/screenkey/screenkey/-/issues/122 is fixed.
+ intltool
+ # We are not sure why is this needed, but without it we get "file: command
+ # not found" errors during build.
+ file
+ wrapGAppsHook
+ # for setup hook
+ gobject-introspection
+ ];
+
+ buildInputs = [
+ gtk3
+ ];
+
+ propagatedBuildInputs = with python3.pkgs; [
+ pycairo
+ pygobject3
+ ];
+
+ # Prevent double wrapping because of wrapGAppsHook
+ dontWrapGApps = true;
+ # https://github.com/NixOS/nixpkgs/issues/56943
+ strictDeps = false;
+ preFixup = ''
+ makeWrapperArgs+=("''${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 = "A screencast tool to display your keys inspired by Screenflick";
+ license = licenses.gpl3Plus;
+ platforms = platforms.linux;
+ maintainers = [ maintainers.rasendubi ];
+ };
+}