[PATCH 0/2] Update clipmenu and improve it

  • Open
  • quality assurance status badge
Details
2 participants
  • EuAndreh
  • Christopher Baines
Owner
unassigned
Submitted by
EuAndreh
Severity
normal
E
E
EuAndreh wrote on 31 Oct 2022 21:08
(address . guix-patches@gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20221031200839.10945-1-eu@euandre.org
Refactor build code, using g-expressions. A `git diff -w` (-w for
"whitespace") makes it clearer that those are the changes.

EuAndreh (2):
gnu: clipmenu: Update to 6.2.0.
gnu: clipmenu: Improve package style.

gnu/packages/xdisorg.scm | 146 +++++++++++++++++++--------------------
1 file changed, 71 insertions(+), 75 deletions(-)

--
2.38.0
E
E
EuAndreh wrote on 31 Oct 2022 21:17
[PATCH 1/2] gnu: clipmenu: Update to 6.2.0.
(address . 58931@debbugs.gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20221031201741.29100-1-eu@euandre.org
* gnu/packages/xdisorg.scm (clipmenu): Update to 6.2.0.
---
gnu/packages/xdisorg.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 1a868146a0..a0f0f54773 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2768,11 +2768,11 @@ (define-public clipnotify
(license license:public-domain)))
(define-public clipmenu
- (let ((commit "bcbe7b144598db4a103f14e8408c4b7327d6d5e1")
+ (let ((commit "7c34ace1fbab76eb1c1dc9b30dd4ac1a7fe4b90b")
(revision "1"))
(package
(name "clipmenu")
- (version (string-append "6.0.1-"
+ (version (string-append "6.2.0-"
revision "." (string-take commit 7)))
(source
(origin
@@ -2783,7 +2783,7 @@ (define-public clipmenu
(file-name (git-file-name name version))
(sha256
(base32
- "0053j4i14lz5m2bzc5sch5id5ilr1bl196mp8fp0q8x74w3vavs9"))))
+ "1403sw49ccb8xsd8v611fzp0csaglfz8nmz3wcjsk8x11h9jvxwy"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -2799,6 +2799,8 @@ (define-public clipmenu
(install-file "clipdel" bin)
(install-file "clipmenu" bin)
(install-file "clipmenud" bin)
+ (install-file "clipfsck" bin)
+ (install-file "clipctl" bin)
(install-file "README.md" doc)
#t)))
(add-after 'install 'wrap-script
@@ -2820,7 +2822,7 @@ (define-public clipmenu
(string-append dir "/bin"))
(list clipnotify coreutils-minimal
gawk util-linux xdotool xsel)))))
- '("clipmenu" "clipmenud" "clipdel")))
+ '("clipmenu" "clipmenud" "clipdel" "clipfsck" "clipctl")))
#t))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
--
2.38.0
E
E
EuAndreh wrote on 31 Oct 2022 21:17
[PATCH 2/2] gnu: clipmenu: Improve package style.
(address . 58931@debbugs.gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20221031201741.29100-2-eu@euandre.org
* gnu/packages/xdisorg.scm (clipmenu)[arguments]: Use g-expressions;
remove trailing #t from phases.
[source]: Use url-fetch over ad-hoc git-fetch.
---
gnu/packages/xdisorg.scm | 148 +++++++++++++++++++--------------------
1 file changed, 71 insertions(+), 77 deletions(-)

Toggle diff (168 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index a0f0f54773..288a01129f 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2768,82 +2768,76 @@ (define-public clipnotify
(license license:public-domain)))
(define-public clipmenu
- (let ((commit "7c34ace1fbab76eb1c1dc9b30dd4ac1a7fe4b90b")
- (revision "1"))
- (package
- (name "clipmenu")
- (version (string-append "6.2.0-"
- revision "." (string-take commit 7)))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/cdown/clipmenu")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1403sw49ccb8xsd8v611fzp0csaglfz8nmz3wcjsk8x11h9jvxwy"))))
- (build-system gnu-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (doc (string-append %output "/share/doc/"
- ,name "-" ,version)))
- (install-file "clipdel" bin)
- (install-file "clipmenu" bin)
- (install-file "clipmenud" bin)
- (install-file "clipfsck" bin)
- (install-file "clipctl" bin)
- (install-file "README.md" doc)
- #t)))
- (add-after 'install 'wrap-script
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (clipnotify (assoc-ref inputs "clipnotify"))
- (coreutils-minimal (assoc-ref inputs "coreutils-minimal"))
- (gawk (assoc-ref inputs "gawk"))
- (util-linux (assoc-ref inputs "util-linux"))
- (xdotool (assoc-ref inputs "xdotool"))
- (xsel (assoc-ref inputs "xsel"))
- (guile (search-input-file inputs "bin/guile")))
- (for-each
- (lambda (prog)
- (wrap-script (string-append out "/bin/" prog)
- #:guile guile
- `("PATH" ":" prefix
- ,(map (lambda (dir)
- (string-append dir "/bin"))
- (list clipnotify coreutils-minimal
- gawk util-linux xdotool xsel)))))
- '("clipmenu" "clipmenud" "clipdel" "clipfsck" "clipctl")))
- #t))
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; substitute a shebang appearing inside a string (the test
- ;; file writes this string to a temporary file):
- (substitute* "tests/test-clipmenu"
- (("#!/usr/bin/env bash")
- (string-append "#!" (which "bash"))))
- (invoke "tests/test-clipmenu")
- #t)))))
- (inputs
- (list clipnotify
- coreutils-minimal
- gawk
- guile-3.0 ; for wrap-script
- util-linux
- xdotool
- xsel))
- (home-page "https://github.com/cdown/clipmenu")
- (synopsis "Simple clipboard manager using dmenu or rofi and xsel")
- (description "Start @command{clipmenud}, then run @command{clipmenu} to
+ (package
+ (name "clipmenu")
+ (version "6.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/cdown/clipmenu/archive/refs/tags/"
+ version
+ "/clipmenu-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1f5vmncamnx5n3pwrs5s7v8c9xfckz6f3ikiiqbai3g7vclh90qm"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda _
+ (let ((bin (string-append #$output "/bin"))
+ (doc (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "clipdel" bin)
+ (install-file "clipmenu" bin)
+ (install-file "clipmenud" bin)
+ (install-file "clipfsck" bin)
+ (install-file "clipctl" bin)
+ (install-file "README.md" doc))))
+ (add-after 'install 'wrap-script
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (clipnotify (assoc-ref inputs "clipnotify"))
+ (coreutils-minimal (assoc-ref inputs "coreutils-minimal"))
+ (gawk (assoc-ref inputs "gawk"))
+ (util-linux (assoc-ref inputs "util-linux"))
+ (xdotool (assoc-ref inputs "xdotool"))
+ (xsel (assoc-ref inputs "xsel"))
+ (guile (search-input-file inputs "bin/guile")))
+ (for-each
+ (lambda (prog)
+ (wrap-script (string-append out "/bin/" prog)
+ #:guile guile
+ `("PATH" ":" prefix
+ ,(map (lambda (dir)
+ (string-append dir "/bin"))
+ (list clipnotify coreutils-minimal
+ gawk util-linux xdotool xsel)))))
+ '("clipmenu" "clipmenud" "clipdel" "clipfsck" "clipctl")))))
+ (replace 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; substitute a shebang appearing inside a string (the test
+ ;; file writes this string to a temporary file):
+ (substitute* "tests/test-clipmenu"
+ (("#!/usr/bin/env bash")
+ (string-append "#!" (which "bash"))))
+ (invoke "tests/test-clipmenu"))))))
+ (inputs
+ (list clipnotify
+ coreutils-minimal
+ gawk
+ guile-3.0 ; for wrap-script
+ util-linux
+ xdotool
+ xsel))
+ (home-page "https://github.com/cdown/clipmenu")
+ (synopsis "Simple clipboard manager using dmenu or rofi and xsel")
+ (description "Start @command{clipmenud}, then run @command{clipmenu} to
select something to put on the clipboard.
When @command{clipmenud} detects changes to the clipboard contents, it writes
@@ -2851,7 +2845,7 @@ (define-public clipmenu
to find all available clips and launches @command{dmenu} (or @command{rofi},
depending on the value of @code{CM_LAUNCHER}) to let the user select a clip.
After selection, the clip is put onto the PRIMARY and CLIPBOARD X selections.")
- (license license:public-domain))))
+ (license license:public-domain)))
(define-public kbdd
(package
--
2.38.0
C
C
Christopher Baines wrote on 3 Nov 2022 18:15
(name . EuAndreh)(address . eu@euandre.org)
877d0cm00k.fsf@cbaines.net
EuAndreh via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (4 lines)
> * gnu/packages/xdisorg.scm (clipmenu)[arguments]: Use g-expressions;
> remove trailing #t from phases.
> [source]: Use url-fetch over ad-hoc git-fetch.

The linter points out:

the source URI should not be an autogenerated tarball

Given that, we probably want to stick with fetching via Git?
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmNj92tfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XckZA//QWkz8aHo8Kn4jLCdNGppSvb8LtPJxktz
UAelmN7vgZeq5CV5EuLtlgjAE+O6cDhaGm8BI0I1xrBCkTs56VqmJ5xEHsQLB+J8
Z5AEVa7h03oo8jtVS+k3gFmtA8X8HqxgiV6WsZG96rIRpTjvj96CqBFsOvZxU7OA
HQACmrBvBULRnYApBPHrvm63H53UclsN9C2HYIve/rLfW8Zwcd4hSvT3KH09ZwJC
frXulvwo60+8/p2jyNc2ZlP6MEUmcx+6Q49lB84C8r8seH/Q09VrjJSg+0CvEX2t
4JESG+HXWDoDHdbVOk3V4YX/8fxeaQdCVyFxCcVnBjjafHiSV7xtsWiC36C2jDxm
7PgGvzkete2PZuKSUW6n1d6sfW/BGAbXCLcuX5uDXvSdtjmTBcy1dDW5l7TLGOKs
FPgrLtjxaL/1eOdJyR0xaAF1zLsOKqQ+hJK7UMVv+ZjsupGnrXFG/ad8Qcoei9mK
3lIgIRt7W0EGlRVcxQLXu8TSdiRxNbsvG9M8r8h59Ka6MHBbaJpTg+w9BD2pr6jn
9cnLjfHZsrrLpZZKY3GhURbku5wYkYuFsLSjAJAFNwxbmcZAVAvwDCw5+6kWRDuW
uShVdBqH9yaoFm7pWTiL10PejsV6/S7f4DRD8VyUqozI3NJJ2OGKi64COAlVh5xw
5kuFLDhLv4Y=
=bn9r
-----END PGP SIGNATURE-----

C
C
Christopher Baines wrote on 3 Nov 2022 19:00
tag 58931 moreinfo
(address . control@debbugs.gnu.org)
87y1sr2a0t.fsf@cbaines.net
tags 58931 + moreinfo
quit
E
E
EuAndreh wrote on 30 Nov 2022 00:23
[PATCH v2 2/2] gnu: clipmenu: Improve package style.
(address . 58931@debbugs.gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20221129232346.29710-3-eu@euandre.org
* gnu/packages/xdisorg.scm (clipmenu)[arguments]: Use g-expressions;
remove trailing #t from phases.
---

No more changing the git-fetch here.

gnu/packages/xdisorg.scm | 91 +++++++++++++++++++---------------------
1 file changed, 44 insertions(+), 47 deletions(-)

Toggle diff (104 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index f2edb793e8..1943a75377 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2827,53 +2827,50 @@ (define-public clipmenu
"1403sw49ccb8xsd8v611fzp0csaglfz8nmz3wcjsk8x11h9jvxwy"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (delete 'build)
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (doc (string-append %output "/share/doc/"
- ,name "-" ,version)))
- (install-file "clipdel" bin)
- (install-file "clipmenu" bin)
- (install-file "clipmenud" bin)
- (install-file "clipfsck" bin)
- (install-file "clipctl" bin)
- (install-file "README.md" doc)
- #t)))
- (add-after 'install 'wrap-script
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (clipnotify (assoc-ref inputs "clipnotify"))
- (coreutils-minimal (assoc-ref inputs "coreutils-minimal"))
- (gawk (assoc-ref inputs "gawk"))
- (util-linux (assoc-ref inputs "util-linux"))
- (xdotool (assoc-ref inputs "xdotool"))
- (xsel (assoc-ref inputs "xsel"))
- (guile (search-input-file inputs "bin/guile")))
- (for-each
- (lambda (prog)
- (wrap-script (string-append out "/bin/" prog)
- #:guile guile
- `("PATH" ":" prefix
- ,(map (lambda (dir)
- (string-append dir "/bin"))
- (list clipnotify coreutils-minimal
- gawk util-linux xdotool xsel)))))
- '("clipmenu" "clipmenud" "clipdel" "clipfsck" "clipctl")))
- #t))
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- ;; substitute a shebang appearing inside a string (the test
- ;; file writes this string to a temporary file):
- (substitute* "tests/test-clipmenu"
- (("#!/usr/bin/env bash")
- (string-append "#!" (which "bash"))))
- (invoke "tests/test-clipmenu")
- #t)))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda _
+ (let ((bin (string-append #$output "/bin"))
+ (doc (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (install-file "clipdel" bin)
+ (install-file "clipmenu" bin)
+ (install-file "clipmenud" bin)
+ (install-file "clipfsck" bin)
+ (install-file "clipctl" bin)
+ (install-file "README.md" doc))))
+ (add-after 'install 'wrap-script
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (clipnotify (assoc-ref inputs "clipnotify"))
+ (coreutils-minimal (assoc-ref inputs "coreutils-minimal"))
+ (gawk (assoc-ref inputs "gawk"))
+ (util-linux (assoc-ref inputs "util-linux"))
+ (xdotool (assoc-ref inputs "xdotool"))
+ (xsel (assoc-ref inputs "xsel"))
+ (guile (search-input-file inputs "bin/guile")))
+ (for-each
+ (lambda (prog)
+ (wrap-script (string-append out "/bin/" prog)
+ #:guile guile
+ `("PATH" ":" prefix
+ ,(map (lambda (dir)
+ (string-append dir "/bin"))
+ (list clipnotify coreutils-minimal
+ gawk util-linux xdotool xsel)))))
+ '("clipmenu" "clipmenud" "clipdel" "clipfsck" "clipctl")))))
+ (replace 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ ;; substitute a shebang appearing inside a string (the test
+ ;; file writes this string to a temporary file):
+ (substitute* "tests/test-clipmenu"
+ (("#!/usr/bin/env bash")
+ (string-append "#!" (which "bash"))))
+ (invoke "tests/test-clipmenu"))))))
(inputs
(list clipnotify
coreutils-minimal
--
2.38.1
E
E
EuAndreh wrote on 30 Nov 2022 00:23
[PATCH v2 1/2] gnu: clipmenu: Update to 6.2.0.
(address . 58931@debbugs.gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20221129232346.29710-2-eu@euandre.org
* gnu/packages/xdisorg.scm (clipmenu): Update to 6.2.0.
---

This patch is the same as previously.


gnu/packages/xdisorg.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (47 lines)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 9cc7cc652a..f2edb793e8 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -2809,11 +2809,11 @@ (define-public clipnotify
(license license:public-domain)))
(define-public clipmenu
- (let ((commit "bcbe7b144598db4a103f14e8408c4b7327d6d5e1")
+ (let ((commit "7c34ace1fbab76eb1c1dc9b30dd4ac1a7fe4b90b")
(revision "1"))
(package
(name "clipmenu")
- (version (string-append "6.0.1-"
+ (version (string-append "6.2.0-"
revision "." (string-take commit 7)))
(source
(origin
@@ -2824,7 +2824,7 @@ (define-public clipmenu
(file-name (git-file-name name version))
(sha256
(base32
- "0053j4i14lz5m2bzc5sch5id5ilr1bl196mp8fp0q8x74w3vavs9"))))
+ "1403sw49ccb8xsd8v611fzp0csaglfz8nmz3wcjsk8x11h9jvxwy"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -2840,6 +2840,8 @@ (define-public clipmenu
(install-file "clipdel" bin)
(install-file "clipmenu" bin)
(install-file "clipmenud" bin)
+ (install-file "clipfsck" bin)
+ (install-file "clipctl" bin)
(install-file "README.md" doc)
#t)))
(add-after 'install 'wrap-script
@@ -2861,7 +2863,7 @@ (define-public clipmenu
(string-append dir "/bin"))
(list clipnotify coreutils-minimal
gawk util-linux xdotool xsel)))))
- '("clipmenu" "clipmenud" "clipdel")))
+ '("clipmenu" "clipmenud" "clipdel" "clipfsck" "clipctl")))
#t))
(replace 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
--
2.38.1
E
E
EuAndreh wrote on 30 Nov 2022 00:23
[PATCH v2 0/2] Update clipmenu and improve it
(address . 58931@debbugs.gnu.org)(name . EuAndreh)(address . eu@euandre.org)
20221129232346.29710-1-eu@euandre.org
Indeed the patch was triggering lint warnings.

These two do just the same thing, but now without changing from
git-fetch to url-fetch.

EuAndreh (2):
gnu: clipmenu: Update to 6.2.0.
gnu: clipmenu: Improve package style.

gnu/packages/xdisorg.scm | 95 ++++++++++++++++++++--------------------
1 file changed, 47 insertions(+), 48 deletions(-)

--
2.38.1
?