* [bug#45745] [PATCH] gnu: Add python-screenkey.
@ 2021-01-09 14:45 Alexandros Theodotou
2021-02-22 18:06 ` bug#45745: Léo Le Bouter via Guix-patches via
0 siblings, 1 reply; 2+ messages 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 related [flat|nested] 2+ messages in thread
* bug#45745:
2021-01-09 14:45 [bug#45745] [PATCH] gnu: Add python-screenkey Alexandros Theodotou
@ 2021-02-22 18:06 ` Léo Le Bouter via Guix-patches via
0 siblings, 0 replies; 2+ messages in thread
From: Léo Le Bouter via Guix-patches via @ 2021-02-22 18:06 UTC (permalink / raw)
To: 45745-done
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
Made it work and pushed as ad06c29b37924ecf5eb3bd440c7456cad6415c3b.
Have a look at the redshift package for an example on how to wrap the
final binary to include PYTHONPATH and GI_TYPELIB_PATH from the build
environment.
For this one, I added such a phase:
(add-after 'install 'wrap-screenkey
(lambda* (#:key outputs #:allow-other-keys)
(wrap-program
(string-append (assoc-ref outputs "out")
"/bin/screenkey")
`("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
`("GI_TYPELIB_PATH"
":" prefix (,(getenv "GI_TYPELIB_PATH"))))
#t))
Thank you!
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-22 18:07 UTC | newest]
Thread overview: 2+ messages (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
2021-02-22 18:06 ` bug#45745: Léo Le Bouter via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.