unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / Atom feed
* [bug#45745] [PATCH] gnu: Add python-screenkey.
@ 2021-01-09 14:45 Alexandros Theodotou
  0 siblings, 0 replies; only message in thread
From: Alexandros Theodotou @ 2021-01-09 14:45 UTC (permalink / raw)
  To: 45745

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

Hi,

This patch adds python-screenkey. It almost works with:
```
guix environment -L . python-screenkey --ad-hoc python-screenkey --
screenkey
```

although it can't initialize GTK.

I don't know how to fix this, if someone wants to take it from here
please go ahead.

Thanks,
Alex

[-- Attachment #2: 0001-gnu-Add-python-screenkey.patch --]
[-- Type: text/x-patch, Size: 3127 bytes --]

From cd84aeecbcd370df5c45b077ac765b5f2e8070f4 Mon Sep 17 00:00:00 2001
From: Alexandros Theodotou <alex@zrythm.org>
Date: Sat, 9 Jan 2021 14:42:47 +0000
Subject: [PATCH] gnu: Add python-screenkey.

* gnu/packages/python-xyz.scm (python-screenkey): New variable.
---
 gnu/packages/python-xyz.scm | 49 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 23e43b7e75..87d0ba89dc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -74,7 +74,7 @@
 ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
 ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
 ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
-;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
+;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
 ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
 ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
 ;;; Copyright © 2020 Matthew Kraai <kraai@ftbfs.org>
@@ -23451,3 +23451,50 @@ Qt applications.")
       "Pivy provides python bindings for Coin, a 3D graphics library with an
 Application Programming Interface based on the Open Inventor 2.1 API.")
     (license license:isc)))
+
+(define-public python-screenkey
+  (package
+    (name "python-screenkey")
+    (version "1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/wavexx/screenkey.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1lsnkkvy9cijsalv12x746azab45xb958h00nf616kn91kiy5np1"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-dlopen-paths
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let* ((x11 (assoc-ref inputs "libx11"))
+                   (xtst (assoc-ref inputs "libxtst")))
+              (substitute* "Screenkey/xlib.py"
+                           (("libX11.so.6")
+                            (string-append x11 "/lib/libX11.so.6")))
+              (substitute* "Screenkey/xlib.py"
+                           (("libXtst.so.6")
+                            (string-append xtst "/lib/libXtst.so.6")))
+              #t))))))
+    (inputs
+     `(("python-distutils-extra" ,python-distutils-extra)
+       ("python-tokenize-rt" ,python-tokenize-rt)
+       ("intltool" ,intltool)
+       ("libx11" ,libx11)
+       ("libxtst" ,libxtst)
+       ("gtk+" ,gtk+)
+       ("python-pygobject" ,python-pygobject)
+       ("python-pycairo" ,python-pycairo)
+       ("python-setuptools-git" ,python-setuptools-git)))
+    (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
+    (synopsis
+      "Screencast tool to display pressed keys")
+    (description
+      "A screencast tool to display your keys inspired by Screenflick.")
+    (license license:gpl3+)))
-- 
2.29.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-09 14:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 14:45 [bug#45745] [PATCH] gnu: Add python-screenkey Alexandros Theodotou

unofficial mirror of guix-patches@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git