* [Patch] Tmux Themepack
@ 2016-06-09 17:23 Matthew Jordan
2016-06-11 7:45 ` Ricardo Wurmus
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Jordan @ 2016-06-09 17:23 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 50 bytes --]
Good Day,
This patch to add the tmux themepack.
[-- Attachment #2: Patch to add Tmux Themepack. --]
[-- Type: text/x-patch, Size: 3205 bytes --]
From 9d400b025a3d60bc29b58ba0bf1301a418ba7aa2 Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Wed, 18 May 2016 18:20:30 -0400
Subject: [PATCH] gnu: Add Tmux themepack
* gnu/packages/tmux.scm: (tmux-themepack): New variable.
---
gnu/packages/tmux.scm | 44 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index d89fc16..3617cb4 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,10 +22,16 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix build-system trivial)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages base)
#:use-module (gnu packages libevent)
- #:use-module (gnu packages ncurses))
+ #:use-module (gnu packages ncurses)
+ #:use-module (guix utils)
+ #:use-module (guix build utils))
+
(define-public tmux
(package
@@ -50,3 +57,38 @@ windows), each running a separate program, to be created, accessed, and
controlled from a single screen. tmux may be detached from a screen and
continue running in the background, then later reattached.")
(license isc)))
+
+(define-public tmux-themepack
+ (package
+ (name "tmux-themepack")
+ (version "03a3728") ;; No version tags
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jimeh/tmux-themepack.git")
+ (commit version)))
+ (sha256
+ (base32
+ "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder (begin
+ (use-modules (guix build utils))
+ (let* ((out (string-append
+ (assoc-ref %outputs "out") "/share/" ,name "-" ,version))
+ (env (assoc-ref %build-inputs "coreutils"))
+ (in (string-append (assoc-ref %build-inputs "source"))))
+ (copy-recursively in ".")
+ (substitute* "themepack.tmux"
+ (("#!/usr/bin/env") (string-append "#!" env "/bin/env")))
+ (mkdir-p out)
+ (copy-recursively "." out)))))
+ (propagated-inputs
+ `(("tmux" ,tmux)
+ ("coreutils" ,coreutils)))
+ (home-page "https://github.com/jimeh/tmux-themepack")
+ (synopsis "Pack of various Tmux themes")
+ (description "A pack of various Tmux themes.")
+ (license
+ (non-copyleft "http://www.wtfpl.net/txt/copying/"))))
--
2.8.3
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
Matthew Jordan
Sent with my mu4e
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-06-09 17:23 [Patch] Tmux Themepack Matthew Jordan
@ 2016-06-11 7:45 ` Ricardo Wurmus
2016-06-12 20:01 ` Matthew Jordan
0 siblings, 1 reply; 11+ messages in thread
From: Ricardo Wurmus @ 2016-06-11 7:45 UTC (permalink / raw)
To: Matthew Jordan; +Cc: guix-devel
Hi Matthew,
thank you very much for your patch! Below are some comments.
> From 9d400b025a3d60bc29b58ba0bf1301a418ba7aa2 Mon Sep 17 00:00:00 2001
> From: Matthew Jordan <matthewjordandevops@yandex.com>
> Date: Wed, 18 May 2016 18:20:30 -0400
> Subject: [PATCH] gnu: Add Tmux themepack
> * gnu/packages/tmux.scm: (tmux-themepack): New variable.
The first “:” (after “scm”) should be deleted.
> @@ -21,10 +22,16 @@
> #:use-module (guix licenses)
> #:use-module (guix packages)
> #:use-module (guix download)
> + #:use-module (guix git-download)
> + #:use-module (guix build-system trivial)
> #:use-module (guix build-system gnu)
> #:use-module (gnu packages)
> + #:use-module (gnu packages base)
> #:use-module (gnu packages libevent)
> - #:use-module (gnu packages ncurses))
> + #:use-module (gnu packages ncurses)
> + #:use-module (guix utils)
> + #:use-module (guix build utils))
> +
This may not be important, but I suggest putting the “use-module”
expressions for “(guix utils)” and “(guix build utils)” further up where
“(guix packages)” is.
> +
> +(define-public tmux-themepack
> + (package
> + (name "tmux-themepack")
> + (version "03a3728") ;; No version tags
Please see “7.6.3 Version Numbers” in the Guix manual. We use the full
commit (in a let binding) and construct a version string from it.
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/jimeh/tmux-themepack.git")
> + (commit version)))
> + (sha256
> + (base32
> + "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))))
> + (build-system trivial-build-system)
> + (arguments
> + `(#:modules ((guix build utils))
> + #:builder (begin
> + (use-modules (guix build utils))
> + (let* ((out (string-append
> + (assoc-ref %outputs "out") "/share/" ,name "-" ,version))
> + (env (assoc-ref %build-inputs "coreutils"))
> + (in (string-append (assoc-ref %build-inputs "source"))))
> + (copy-recursively in ".")
> + (substitute* "themepack.tmux"
> + (("#!/usr/bin/env") (string-append "#!" env "/bin/env")))
> + (mkdir-p out)
> + (copy-recursively "." out)))))
I wonder: could you use the gnu-build-system, delete the “configure” and
“build” phases, and override the “install” phase to copy the files?
Instead of running “substitute*” on “themepack.tmux” you can use the
“patch-shebang” procedure.
> + (propagated-inputs
> + `(("tmux" ,tmux)
> + ("coreutils" ,coreutils)))
Why should coreutils be propagated? And why should tmux be installed
automatically? I think “tmux” doesn’t even need to be an input at all.
> + (home-page "https://github.com/jimeh/tmux-themepack")
> + (synopsis "Pack of various Tmux themes")
How about “Collection of themes for Tmux”.
> + (description "A pack of various Tmux themes.")
Please add a description with full sentences.
Could you please send an updated patch?
Thank you!
~~ Ricardo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-06-11 7:45 ` Ricardo Wurmus
@ 2016-06-12 20:01 ` Matthew Jordan
2016-06-18 0:00 ` Leo Famulari
0 siblings, 1 reply; 11+ messages in thread
From: Matthew Jordan @ 2016-06-12 20:01 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 72 bytes --]
Good Day,
The package has been updated inline with suggested changes.
[-- Attachment #2: Patch to add the tmux-themepack package. --]
[-- Type: text/x-patch, Size: 3158 bytes --]
From 1b8c8fc3d727d32b515fac48bd989599aa2f7932 Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Wed, 18 May 2016 18:20:30 -0400
Subject: [PATCH] gnu: Add Tmux themepack
* gnu/packages/tmux.scm (tmux-themepack): New variable.
---
gnu/packages/tmux.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index d89fc16..1d15820 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,11 +22,16 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages base)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
+
(define-public tmux
(package
(name "tmux")
@@ -50,3 +56,37 @@ windows), each running a separate program, to be created, accessed, and
controlled from a single screen. tmux may be detached from a screen and
continue running in the background, then later reattached.")
(license isc)))
+
+(define-public tmux-themepack
+ (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48"))
+ (package
+ (name "tmux-themepack")
+ (version (string-append "1.0.0." (string-take commit 7))) ;; No version tags
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ (string-append "https://github.com/jimeh/" name ".git"))
+ (commit commit)))
+ (sha256
+ (base32
+ "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((out (string-append
+ (assoc-ref outputs "out")
+ "/share/" ,name "-" ,version)))
+ (mkdir-p out)
+ (copy-recursively "." out)))))))
+ (home-page "https://github.com/jimeh/tmux-themepack")
+ (synopsis "Collection of themes for Tmux")
+ (description "A collection of various themes for Tmux.")
+ (license
+ (non-copyleft "http://www.wtfpl.net/txt/copying/")))))
--
2.8.3
[-- Attachment #3: Type: text/plain, Size: 37 bytes --]
--
Matthew Jordan
Sent with my mu4e
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-06-12 20:01 ` Matthew Jordan
@ 2016-06-18 0:00 ` Leo Famulari
2016-07-10 13:26 ` Matthew Jordan
2016-07-10 14:06 ` guix revisions (Re: [Patch] Tmux Themepack) ng0
0 siblings, 2 replies; 11+ messages in thread
From: Leo Famulari @ 2016-06-18 0:00 UTC (permalink / raw)
To: Matthew Jordan; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1539 bytes --]
On Sun, Jun 12, 2016 at 04:01:41PM -0400, Matthew Jordan wrote:
> Good Day,
>
> The package has been updated inline with suggested changes.
Thanks! Can you test the attached revision on your patch? Here are the
changes:
> +(define-public tmux-themepack
> + (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48"))
> + (package
> + (name "tmux-themepack")
> + (version (string-append "1.0.0." (string-take commit 7))) ;; No version tags
I think we need to improve 7.6.3 Version Numbers in the manual. *Nobody*
gets it right the first time :)
With no upstream revision, we use 0.0.0 as the version (this should be
documented). We also include a Guix package revision number, which seems
to begin at 1. It ends up looking like this:
(define-public tmux-themepack
(let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48")
(revision "1"))
(package
(name "tmux-themepack")
(version (string-append "0.0.0-" revision "." (string-take commit 7))) ;; No version tags
> + `(#:tests? #f
I added the comment "no test suite".
> + (replace 'install
> + (lambda* (#:key inputs outputs #:allow-other-keys)
Since no inputs were referred to, I remove 'inputs'.
> + (let* ((out (string-append
> + (assoc-ref outputs "out")
> + "/share/" ,name "-" ,version)))
> + (mkdir-p out)
This (mkdir-p) does not appear to be needed, so I removed it.
[-- Attachment #2: 0001-gnu-Add-Tmux-Themepack.patch --]
[-- Type: text/x-diff, Size: 3145 bytes --]
From f3ee545ac6734d2e20b02dffc7fa808973dae8dc Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Sun, 12 Jun 2016 16:01:41 -0400
Subject: [PATCH] gnu: Add Tmux Themepack.
* gnu/packages/tmux.scm (tmux-themepack): New variable.
---
gnu/packages/tmux.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index d89fc16..c15d683 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,11 +22,16 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages base)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
+
(define-public tmux
(package
(name "tmux")
@@ -50,3 +56,39 @@ windows), each running a separate program, to be created, accessed, and
controlled from a single screen. tmux may be detached from a screen and
continue running in the background, then later reattached.")
(license isc)))
+
+(define-public tmux-themepack
+ (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48")
+ (revision "1"))
+ (package
+ (name "tmux-themepack")
+ (version (string-append "0.0.0-"
+ revision "."
+ (string-take commit 7))) ;; No version tags
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ (string-append "https://github.com/jimeh/" name ".git"))
+ (commit commit)))
+ (sha256
+ (base32
+ "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no test suite
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append
+ (assoc-ref outputs "out")
+ "/share/" ,name "-" ,version)))
+ (copy-recursively "." out)))))))
+ (home-page "https://github.com/jimeh/tmux-themepack")
+ (synopsis "Collection of themes for Tmux")
+ (description "A collection of various themes for Tmux.")
+ (license
+ (non-copyleft "http://www.wtfpl.net/txt/copying/")))))
--
2.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-06-18 0:00 ` Leo Famulari
@ 2016-07-10 13:26 ` Matthew Jordan
2016-07-10 16:19 ` Leo Famulari
2016-07-10 14:06 ` guix revisions (Re: [Patch] Tmux Themepack) ng0
1 sibling, 1 reply; 11+ messages in thread
From: Matthew Jordan @ 2016-07-10 13:26 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 275 bytes --]
Good Day,
> Thanks! Can you test the attached revision on your patch? Here are the
> changes:
Hi I tried applying to patch and git gave me an error asking if I hand
edited the patch file.
So I added the changes to the attached patch. Let me know if I covered everything.
[-- Attachment #2: Patch to add tmux-themepack --]
[-- Type: text/x-patch, Size: 3212 bytes --]
From f6d471c2292e6b0a70b84d46653fba15d0b823dc Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Wed, 18 May 2016 18:20:30 -0400
Subject: [PATCH] gnu: Add Tmux themepack
* gnu/packages/tmux.scm (tmux-themepack): New variable.
---
gnu/packages/tmux.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index d89fc16..33b5363 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,11 +22,16 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix utils)
+ #:use-module (guix build utils)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
+ #:use-module (gnu packages base)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
+
(define-public tmux
(package
(name "tmux")
@@ -50,3 +56,39 @@ windows), each running a separate program, to be created, accessed, and
controlled from a single screen. tmux may be detached from a screen and
continue running in the background, then later reattached.")
(license isc)))
+
+(define-public tmux-themepack
+ (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48")
+ (revision "1"))
+ (package
+ (name "tmux-themepack")
+ (version
+ (string-append "0.0.0-" revision "." (string-take commit 7))) ;; No version tags
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ (string-append "https://github.com/jimeh/" name ".git"))
+ (commit commit)))
+ (sha256
+ (base32
+ "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; Not tests
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append
+ (assoc-ref outputs "out")
+ "/share/" ,name "-" ,version)))
+ (mkdir-p out)
+ (copy-recursively "." out)))))))
+ (home-page "https://github.com/jimeh/tmux-themepack")
+ (synopsis "Collection of themes for Tmux")
+ (description "A collection of various themes for Tmux.")
+ (license
+ (non-copyleft "http://www.wtfpl.net/txt/copying/")))))
--
2.9.0
[-- Attachment #3: Type: text/plain, Size: 20 bytes --]
---
Matthew Jordan
^ permalink raw reply related [flat|nested] 11+ messages in thread
* guix revisions (Re: [Patch] Tmux Themepack)
2016-06-18 0:00 ` Leo Famulari
2016-07-10 13:26 ` Matthew Jordan
@ 2016-07-10 14:06 ` ng0
2016-07-10 15:45 ` Leo Famulari
1 sibling, 1 reply; 11+ messages in thread
From: ng0 @ 2016-07-10 14:06 UTC (permalink / raw)
To: guix-devel
Hi,
Leo Famulari <leo@famulari.name> writes:
> On Sun, Jun 12, 2016 at 04:01:41PM -0400, Matthew Jordan wrote:
>> Good Day,
>>
>> The package has been updated inline with suggested changes.
>
> Thanks! Can you test the attached revision on your patch? Here are the
> changes:
>
>> +(define-public tmux-themepack
>> + (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48"))
>> + (package
>> + (name "tmux-themepack")
>> + (version (string-append "1.0.0." (string-take commit 7))) ;; No version tags
>
> I think we need to improve 7.6.3 Version Numbers in the manual. *Nobody*
> gets it right the first time :)
>
> With no upstream revision, we use 0.0.0 as the version (this should be
> documented). We also include a Guix package revision number, which seems
> to begin at 1. It ends up looking like this:
A side question: We do guix revisions of packages? I know we had
a discussion on this in the past which included the string-take
commit 7 or 8, but even with using grep in the gnu/packages dir
it's not obvious as egrep -nr 'revision "1"'
for example just gives 5 results.
So the documentation needs to be improved, I agree.
--
♥Ⓐ ng0
For non-prism friendly talk find me on http://www.psyced.org
SecuShare – http://secushare.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guix revisions (Re: [Patch] Tmux Themepack)
2016-07-10 14:06 ` guix revisions (Re: [Patch] Tmux Themepack) ng0
@ 2016-07-10 15:45 ` Leo Famulari
2016-07-10 16:16 ` guix revisions ng0
0 siblings, 1 reply; 11+ messages in thread
From: Leo Famulari @ 2016-07-10 15:45 UTC (permalink / raw)
To: ng0; +Cc: guix-devel
On Sun, Jul 10, 2016 at 02:06:44PM +0000, ng0 wrote:
> A side question: We do guix revisions of packages? I know we had
> a discussion on this in the past which included the string-take
> commit 7 or 8, but even with using grep in the gnu/packages dir
> it's not obvious as egrep -nr 'revision "1"'
> for example just gives 5 results.
> So the documentation needs to be improved, I agree.
Without using a revision integer, `guix package --upgrade` will not work
correctly, since Git hashes do not increase (or decrease) reliably.
For example, the computer can't tell which of these two version strings
is the newer version:
"0.0.0-deadbeef"
"0.0.0-cabba9e"
Not all packages declare a revision variable, but I think it is helpful.
Any suggestions on improving this part of the manual? It *does*
explicity describe this problem and the solution. Should we add the
revision variable to the code example?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: guix revisions
2016-07-10 15:45 ` Leo Famulari
@ 2016-07-10 16:16 ` ng0
0 siblings, 0 replies; 11+ messages in thread
From: ng0 @ 2016-07-10 16:16 UTC (permalink / raw)
To: guix-devel
Leo Famulari <leo@famulari.name> writes:
> On Sun, Jul 10, 2016 at 02:06:44PM +0000, ng0 wrote:
>> A side question: We do guix revisions of packages? I know we had
>> a discussion on this in the past which included the string-take
>> commit 7 or 8, but even with using grep in the gnu/packages dir
>> it's not obvious as egrep -nr 'revision "1"'
>> for example just gives 5 results.
>> So the documentation needs to be improved, I agree.
>
> Without using a revision integer, `guix package --upgrade` will not work
> correctly, since Git hashes do not increase (or decrease) reliably.
>
> For example, the computer can't tell which of these two version strings
> is the newer version:
>
> "0.0.0-deadbeef"
> "0.0.0-cabba9e"
>
> Not all packages declare a revision variable, but I think it is helpful.
>
> Any suggestions on improving this part of the manual? It *does*
> explicity describe this problem and the solution. Should we add the
> revision variable to the code example?
Thanks for pointing this out. In future updates of source
checkout software I contributed I'll include the revision and
update it.
You are right that 7.6.3 Version Numbers includes the entire
picture of how it is to be done, but as practice shows the
language or representation is not clear.
I'll try to come up with a fix for that part today.
--
♥Ⓐ ng0
For non-prism friendly talk find me on http://www.psyced.org
SecuShare – http://secushare.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-07-10 13:26 ` Matthew Jordan
@ 2016-07-10 16:19 ` Leo Famulari
2016-07-10 17:56 ` Matthew Jordan
2016-07-11 8:41 ` Alex Kost
0 siblings, 2 replies; 11+ messages in thread
From: Leo Famulari @ 2016-07-10 16:19 UTC (permalink / raw)
To: Matthew Jordan; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 811 bytes --]
On Sun, Jul 10, 2016 at 09:26:50AM -0400, Matthew Jordan wrote:
> Hi I tried applying to patch and git gave me an error asking if I hand
> edited the patch file.
Huh!
> So I added the changes to the attached patch. Let me know if I covered everything.
Thanks! I found myself wondering about some of the new module imports,
in particular (guix build utils), (guix utils), and (gnu packages base).
The latter two are not needed; tmux.scm compiles and tmux and
tmux-themepack can both be built without them.
I think that (guix build utils) should be required to provide
copy-recursively, but everything still works even when I remove the
module. Does anyone know why that is? Is it coming from (guix packages)?
Can you test this and let me know if it works for you? Then we can
finally add tmux-themepack :)
[-- Attachment #2: 0001-gnu-Add-Tmux-Themepack.patch --]
[-- Type: text/x-diff, Size: 3036 bytes --]
From fd78cb1d8c30bb8825cc6330667d3aa886b51777 Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Wed, 18 May 2016 18:20:30 -0400
Subject: [PATCH] gnu: Add Tmux Themepack.
* gnu/packages/tmux.scm (tmux-themepack): New variable.
Signed-off-by: Leo Famulari <leo@famulari.name>
---
gnu/packages/tmux.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index d89fc16..9174d96 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,11 +22,13 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
+
(define-public tmux
(package
(name "tmux")
@@ -50,3 +53,38 @@ windows), each running a separate program, to be created, accessed, and
controlled from a single screen. tmux may be detached from a screen and
continue running in the background, then later reattached.")
(license isc)))
+
+(define-public tmux-themepack
+ (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48")
+ (revision "1"))
+ (package
+ (name "tmux-themepack")
+ (version
+ (string-append "0.0.0-" revision "." (string-take commit 7))) ;; No version tags
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ (string-append "https://github.com/jimeh/" name ".git"))
+ (commit commit)))
+ (sha256
+ (base32
+ "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; No test suite
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append
+ (assoc-ref outputs "out")
+ "/share/" ,name "-" ,version)))
+ (copy-recursively "." out)))))))
+ (home-page "https://github.com/jimeh/tmux-themepack")
+ (synopsis "Collection of themes for Tmux")
+ (description "A collection of various themes for Tmux.")
+ (license
+ (non-copyleft "http://www.wtfpl.net/txt/copying/")))))
--
2.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-07-10 16:19 ` Leo Famulari
@ 2016-07-10 17:56 ` Matthew Jordan
2016-07-11 8:41 ` Alex Kost
1 sibling, 0 replies; 11+ messages in thread
From: Matthew Jordan @ 2016-07-10 17:56 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
Good Day Leo,
> Can you test this and let me know if it works for you? Then we can
> finally add tmux-themepack :)
I removed the modules in question, then built both tmux and
tmux-themepack. Both built successfully.
Attached is an updated patch.
Let me know if you need any other changes.
[-- Attachment #2: Patch to add tmux-themepack --]
[-- Type: text/x-patch, Size: 3106 bytes --]
From 3b8d11ab2b35e7b15a584eb06048c4bca5fffda8 Mon Sep 17 00:00:00 2001
From: Matthew Jordan <matthewjordandevops@yandex.com>
Date: Wed, 18 May 2016 18:20:30 -0400
Subject: [PATCH] gnu: Add Tmux themepack
* gnu/packages/tmux.scm (tmux-themepack): New variable.
---
gnu/packages/tmux.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index d89fc16..6108000 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 Matthew Jordan <matthewjordandevops@yandex.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,11 +22,13 @@
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
+
(define-public tmux
(package
(name "tmux")
@@ -50,3 +53,39 @@ windows), each running a separate program, to be created, accessed, and
controlled from a single screen. tmux may be detached from a screen and
continue running in the background, then later reattached.")
(license isc)))
+
+(define-public tmux-themepack
+ (let ((commit "03a372866f7677f7fe63bcee140b48b9fd372c48")
+ (revision "1"))
+ (package
+ (name "tmux-themepack")
+ (version
+ (string-append "0.0.0-" revision "." (string-take commit 7))) ;; No version tags
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ (string-append "https://github.com/jimeh/" name ".git"))
+ (commit commit)))
+ (sha256
+ (base32
+ "1d3k87mq5lca042jbap5kxskjy3kg79wjhhpnm6jacbn3anc67zl"))
+ (file-name (string-append name "-" version "-checkout"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; Not tests
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (string-append
+ (assoc-ref outputs "out")
+ "/share/" ,name "-" ,version)))
+ (mkdir-p out)
+ (copy-recursively "." out)))))))
+ (home-page "https://github.com/jimeh/tmux-themepack")
+ (synopsis "Collection of themes for Tmux")
+ (description "A collection of various themes for Tmux.")
+ (license
+ (non-copyleft "http://www.wtfpl.net/txt/copying/")))))
--
2.9.0
[-- Attachment #3: Type: text/plain, Size: 35 bytes --]
Respectfully,
---
Matthew Jordan
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Patch] Tmux Themepack
2016-07-10 16:19 ` Leo Famulari
2016-07-10 17:56 ` Matthew Jordan
@ 2016-07-11 8:41 ` Alex Kost
1 sibling, 0 replies; 11+ messages in thread
From: Alex Kost @ 2016-07-11 8:41 UTC (permalink / raw)
To: Leo Famulari; +Cc: guix-devel, Matthew Jordan
Leo Famulari (2016-07-10 19:19 +0300) wrote:
> Thanks! I found myself wondering about some of the new module imports,
> in particular (guix build utils), (guix utils), and (gnu packages base).
>
> The latter two are not needed; tmux.scm compiles and tmux and
> tmux-themepack can both be built without them.
>
> I think that (guix build utils) should be required to provide
> copy-recursively, but everything still works even when I remove the
> module. Does anyone know why that is? Is it coming from (guix packages)?
There is no point to use such modules in a package module.
'copy-recursively' is needed only at the build time. Don't forget that
the value of 'arguments' field is a *quoted* expression. You can write
anything there, and the package module will still be compiled
successfully (it could fail only during the build).
(guix build utils) also shouldn't be explicitly specified inside
'arguments', as it is already used by gnu-build-system - see
%gnu-build-system-modules in (guix build-system gnu).
--
Alex
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-07-11 8:41 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-09 17:23 [Patch] Tmux Themepack Matthew Jordan
2016-06-11 7:45 ` Ricardo Wurmus
2016-06-12 20:01 ` Matthew Jordan
2016-06-18 0:00 ` Leo Famulari
2016-07-10 13:26 ` Matthew Jordan
2016-07-10 16:19 ` Leo Famulari
2016-07-10 17:56 ` Matthew Jordan
2016-07-11 8:41 ` Alex Kost
2016-07-10 14:06 ` guix revisions (Re: [Patch] Tmux Themepack) ng0
2016-07-10 15:45 ` Leo Famulari
2016-07-10 16:16 ` guix revisions ng0
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).