* [PATCH] gnu: Add xcape.
@ 2015-03-15 17:09 Axel
2015-03-16 13:11 ` David Thompson
2015-03-16 14:53 ` Ricardo Wurmus
0 siblings, 2 replies; 5+ messages in thread
From: Axel @ 2015-03-15 17:09 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 128 bytes --]
Xcape allows to use modifier key as another key when pressed and
released on its own.
--
Александр Графов
[-- Attachment #2: 0001-gnu-Add-xcape.patch --]
[-- Type: application/octet-stream, Size: 2236 bytes --]
From 0ad9b0eea2cd6151072d27f5e2505db9db083b37 Mon Sep 17 00:00:00 2001
From: "Alexander I.Grafov (Axel)" <grafov@gmail.com>
Date: Sun, 15 Mar 2015 20:01:03 +0300
Subject: [PATCH] gnu: Add xcape.
* gnu/packages/xdisorg.scm (xcape): New variable.
---
gnu/packages/xdisorg.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index fbf1bbf..03f8186 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -486,3 +486,45 @@ unicode, XFT and may be extended with Perl plugins. It also comes with a
client/daemon pair that lets you open any number of terminal windows from
within a single process.")
(license license:gpl3+)))
+
+(define-public xcape
+ (package
+ (name "xcape")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/alols/"
+ name
+ "/archive/v"
+ version
+ ".tar.gz"))
+ (sha256
+ (base32
+ "0jkdiaxc6sryrbibdgi2y1c48n4l9xyazhxr16l6h4ibddx95bk9"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test target
+ #:phases (alist-replace
+ 'configure
+ (let ((out (assoc-ref %outputs "out")))
+ (lambda _
+ (substitute* "Makefile"
+ (("(PREFIX[[:blank:]]*=.*)")
+ (string-append "CC:=gcc\nPREFIX=" out "\n"))
+ (("(MANDIR.*=.*)")
+ (string-append "MANDIR=/share/man/man1\n")))))
+ %standard-phases)))
+ (inputs
+ `(("libXtst" ,libxtst)
+ ("libX11" ,libx11)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "http://github.com/alols/xcape")
+ (synopsis "Use a modifier key in X.org as another key")
+ (description
+ "This utility for X.org allows to use modifier key as another key when
+pressed and released on its own. The default behaviour is to generate
+the Escape key when Left Control is pressed and released on its own.")
+ (license license:gpl3+)))
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add xcape.
2015-03-15 17:09 [PATCH] gnu: Add xcape Axel
@ 2015-03-16 13:11 ` David Thompson
2015-03-16 14:53 ` Ricardo Wurmus
1 sibling, 0 replies; 5+ messages in thread
From: David Thompson @ 2015-03-16 13:11 UTC (permalink / raw)
To: Axel, guix-devel
Axel <grafov@gmail.com> writes:
> Xcape allows to use modifier key as another key when pressed and
> released on its own.
>
> --
> Александр Графов
> From 0ad9b0eea2cd6151072d27f5e2505db9db083b37 Mon Sep 17 00:00:00 2001
> From: "Alexander I.Grafov (Axel)" <grafov@gmail.com>
> Date: Sun, 15 Mar 2015 20:01:03 +0300
> Subject: [PATCH] gnu: Add xcape.
>
> * gnu/packages/xdisorg.scm (xcape): New variable.
> ---
> gnu/packages/xdisorg.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
> index fbf1bbf..03f8186 100644
> --- a/gnu/packages/xdisorg.scm
> +++ b/gnu/packages/xdisorg.scm
> @@ -486,3 +486,45 @@ unicode, XFT and may be extended with Perl plugins. It also comes with a
> client/daemon pair that lets you open any number of terminal windows from
> within a single process.")
> (license license:gpl3+)))
> +
> +(define-public xcape
> + (package
> + (name "xcape")
> + (version "1.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/alols/"
> + name
> + "/archive/v"
> + version
> + ".tar.gz"))
It's a matter of preference, but we typically put multiple arguments on
the same line and break when we would go over 80 characters.
> + (sha256
> + (base32
> + "0jkdiaxc6sryrbibdgi2y1c48n4l9xyazhxr16l6h4ibddx95bk9"))))
> + (build-system gnu-build-system)
> + (arguments
> + `(#:tests? #f ; no test target
> + #:phases (alist-replace
> + 'configure
> + (let ((out (assoc-ref %outputs "out")))
> + (lambda _
> + (substitute* "Makefile"
> + (("(PREFIX[[:blank:]]*=.*)")
> + (string-append "CC:=gcc\nPREFIX=" out "\n"))
> + (("(MANDIR.*=.*)")
> + (string-append "MANDIR=/share/man/man1\n")))))
> + %standard-phases)))
> + (inputs
> + `(("libXtst" ,libxtst)
> + ("libX11" ,libx11)))
Use a lowercase "x", to match the package names.
> + (native-inputs
> + `(("pkg-config" ,pkg-config)))
> + (home-page "http://github.com/alols/xcape")
> + (synopsis "Use a modifier key in X.org as another key")
> + (description
> + "This utility for X.org allows to use modifier key as another key when
> +pressed and released on its own. The default behaviour is to generate
> +the Escape key when Left Control is pressed and released on its own.")
> + (license license:gpl3+)))
> --
> 2.2.1
Looking good. Thanks!
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add xcape.
2015-03-15 17:09 [PATCH] gnu: Add xcape Axel
2015-03-16 13:11 ` David Thompson
@ 2015-03-16 14:53 ` Ricardo Wurmus
2015-03-16 22:19 ` Axel
1 sibling, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2015-03-16 14:53 UTC (permalink / raw)
To: Axel; +Cc: guix-devel
> From 0ad9b0eea2cd6151072d27f5e2505db9db083b37 Mon Sep 17 00:00:00 2001
> From: "Alexander I.Grafov (Axel)" <grafov@gmail.com>
> Date: Sun, 15 Mar 2015 20:01:03 +0300
> Subject: [PATCH] gnu: Add xcape.
>
> * gnu/packages/xdisorg.scm (xcape): New variable.
> ---
> +
> +(define-public xcape
> + (package
> + (name "xcape")
> + (version "1.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append
> + "https://github.com/alols/"
> + name
> + "/archive/v"
> + version
> + ".tar.gz"))
As the tarball does not include the name of the package you should
probably add something like this:
(file-name (string-append name "-" version ".tar.gz"))
> + (arguments
> + `(#:tests? #f ; no test target
> + #:phases (alist-replace
> + 'configure
> + (let ((out (assoc-ref %outputs "out")))
> + (lambda _
> + (substitute* "Makefile"
> + (("(PREFIX[[:blank:]]*=.*)")
> + (string-append "CC:=gcc\nPREFIX=" out "\n"))
> + (("(MANDIR.*=.*)")
> + (string-append "MANDIR=/share/man/man1\n")))))
Is this really necessary or could you just set these variables as
make-flags?
#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"CC=gcc"
...)
~~ Ricardo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add xcape.
2015-03-16 14:53 ` Ricardo Wurmus
@ 2015-03-16 22:19 ` Axel
2015-03-18 0:31 ` David Thompson
0 siblings, 1 reply; 5+ messages in thread
From: Axel @ 2015-03-16 22:19 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1809 bytes --]
David and Ricardo, thank for a review! I followed your advices and
prepared new patch.
2015-03-16 17:53 GMT+03:00 Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>:
>
>> From 0ad9b0eea2cd6151072d27f5e2505db9db083b37 Mon Sep 17 00:00:00 2001
>> From: "Alexander I.Grafov (Axel)" <grafov@gmail.com>
>> Date: Sun, 15 Mar 2015 20:01:03 +0300
>> Subject: [PATCH] gnu: Add xcape.
>>
>> * gnu/packages/xdisorg.scm (xcape): New variable.
>> ---
>> +
>> +(define-public xcape
>> + (package
>> + (name "xcape")
>> + (version "1.1")
>> + (source
>> + (origin
>> + (method url-fetch)
>> + (uri (string-append
>> + "https://github.com/alols/"
>> + name
>> + "/archive/v"
>> + version
>> + ".tar.gz"))
>
> As the tarball does not include the name of the package you should
> probably add something like this:
>
> (file-name (string-append name "-" version ".tar.gz"))
>
>> + (arguments
>> + `(#:tests? #f ; no test target
>> + #:phases (alist-replace
>> + 'configure
>> + (let ((out (assoc-ref %outputs "out")))
>> + (lambda _
>> + (substitute* "Makefile"
>> + (("(PREFIX[[:blank:]]*=.*)")
>> + (string-append "CC:=gcc\nPREFIX=" out "\n"))
>> + (("(MANDIR.*=.*)")
>> + (string-append "MANDIR=/share/man/man1\n")))))
>
> Is this really necessary or could you just set these variables as
> make-flags?
>
> #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
> "CC=gcc"
> ...)
>
> ~~ Ricardo
--
Александр Графов
[-- Attachment #2: 0001-gnu-Add-xcape.patch --]
[-- Type: application/octet-stream, Size: 1946 bytes --]
From 511494e3a60b7ad055abad4ebb1045be77085aaf Mon Sep 17 00:00:00 2001
From: "Alexander I.Grafov (Axel)" <grafov@gmail.com>
Date: Tue, 17 Mar 2015 01:14:16 +0300
Subject: [PATCH] gnu: Add xcape.
* gnu/packages/xdisorg.scm (xcape): New variable.
---
gnu/packages/xdisorg.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index fbf1bbf..3db9d22 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -486,3 +486,35 @@ unicode, XFT and may be extended with Perl plugins. It also comes with a
client/daemon pair that lets you open any number of terminal windows from
within a single process.")
(license license:gpl3+)))
+
+(define-public xcape
+ (package
+ (name "xcape")
+ (version "1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/alols/" name "/archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0jkdiaxc6sryrbibdgi2y1c48n4l9xyazhxr16l6h4ibddx95bk9"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases (alist-delete 'configure %standard-phases)
+ #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+ "MANDIR=/share/man/man1" "CC=gcc")))
+ (inputs
+ `(("libxtst" ,libxtst)
+ ("libx11" ,libx11)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (home-page "http://github.com/alols/xcape")
+ (synopsis "Use a modifier key in X.org as another key")
+ (description
+ "This utility for X.org allows to use modifier key as another key when
+pressed and released on its own. The default behaviour is to generate
+the Escape key when Left Control is pressed and released on its own.")
+ (license license:gpl3+)))
--
2.2.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add xcape.
2015-03-16 22:19 ` Axel
@ 2015-03-18 0:31 ` David Thompson
0 siblings, 0 replies; 5+ messages in thread
From: David Thompson @ 2015-03-18 0:31 UTC (permalink / raw)
To: Axel, guix-devel
Axel <grafov@gmail.com> writes:
> David and Ricardo, thank for a review! I followed your advices and
> prepared new patch.
Pushed with some small style tweaks and a couple of comments added.
Thanks!
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-18 0:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 17:09 [PATCH] gnu: Add xcape Axel
2015-03-16 13:11 ` David Thompson
2015-03-16 14:53 ` Ricardo Wurmus
2015-03-16 22:19 ` Axel
2015-03-18 0:31 ` David Thompson
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.