unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri)
@ 2019-07-25  3:13 Kyle Andrews
  2019-07-25 13:48 ` zimoun
  2019-09-14 21:04 ` [bug#37404] add herbstluftwm window manager package (v0.7.2) to guix (gnu/packages/wm.scm) Kyle Andrews
  0 siblings, 2 replies; 6+ messages in thread
From: Kyle Andrews @ 2019-07-25  3:13 UTC (permalink / raw)
  To: 36805

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

Hi,

I am a heavy R user trying to get my feet wet with guix. Here is a
patch to remove the hard-coded bioconductor release by adding an
optional 3rd argument to the function with an appropriate default
value. I hope this is helpful.

Regards,

Kyle Andrews

[-- Attachment #2: 0001-NAME-and-VERSION-are-not-enough-for-Bioconductor-URI.patch --]
[-- Type: text/x-patch, Size: 1577 bytes --]

From 729e621cc2175864937b6a4a3e754bd128ac9056 Mon Sep 17 00:00:00 2001
From: Kyle Andrews <kyle.c.andrews@gmail.com>
Date: Wed, 24 Jul 2019 22:51:20 -0400
Subject: [PATCH] NAME and VERSION are not enough for Bioconductor URI. Need
 RELEASE.

---
 guix/build-system/r.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/guix/build-system/r.scm b/guix/build-system/r.scm
index fbf08d3aa7..93b2f2f14f 100644
--- a/guix/build-system/r.scm
+++ b/guix/build-system/r.scm
@@ -47,13 +47,14 @@ available via the first URI, the second URI points to the archived version."
         (string-append "mirror://cran/src/contrib/Archive/"
                        name "/" name "_" version ".tar.gz")))
 
-(define (bioconductor-uri name version)
+(define* (bioconductor-uri name version
+                           #:optional
+                           (release (@@ (guix import cran) %bioconductor-version)))
   "Return a URI string for the R package archive on Bioconductor for the
-release corresponding to NAME and VERSION."
+release corresponding to NAME, package VERSION, and Bioconductor RELEASE."
   (list (string-append "https://bioconductor.org/packages/release/bioc/src/contrib/"
                        name "_" version ".tar.gz")
-        (string-append "https://bioconductor.org/packages/"
-                       (@@ (guix import cran) %bioconductor-version)
+        (string-append "https://bioconductor.org/packages/" release
                        "/bioc/src/contrib/Archive/"
                        name "_" version ".tar.gz")))
 
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri)
  2019-07-25  3:13 [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri) Kyle Andrews
@ 2019-07-25 13:48 ` zimoun
  2019-07-26  4:17   ` Kyle Andrews
  2019-09-14 21:04 ` [bug#37404] add herbstluftwm window manager package (v0.7.2) to guix (gnu/packages/wm.scm) Kyle Andrews
  1 sibling, 1 reply; 6+ messages in thread
From: zimoun @ 2019-07-25 13:48 UTC (permalink / raw)
  To: Kyle Andrews; +Cc: 36805

Dear,

It appears to me nice---if for example one wants to create a channel
for Bioconductor 3.6 or older.
This eases the automation of such channel.

I am using the package `cytofkit`, removed in the last release:
https://bioconductor.org/about/removed-packages/

Append strings to build the uri is not really nice.
https://github.com/zimoun/guix-bimsb/blob/master/bimsb/packages/staging.scm#L2895-L2941

Thank you for this suggestion.


All the best,
simon

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri)
  2019-07-25 13:48 ` zimoun
@ 2019-07-26  4:17   ` Kyle Andrews
  2019-07-26  9:46     ` Ricardo Wurmus
  0 siblings, 1 reply; 6+ messages in thread
From: Kyle Andrews @ 2019-07-26  4:17 UTC (permalink / raw)
  To: zimoun; +Cc: 36805

On Thu, 2019-07-25 at 15:48 +0200, zimoun wrote:
> Dear,
> 
> It appears to me nice---if for example one wants to create a channel
> for Bioconductor 3.6 or older.
> This eases the automation of such channel.
> 
> I am using the package `cytofkit`, removed in the last release:
> https://bioconductor.org/about/removed-packages/
> 
> Append strings to build the uri is not really nice.
> https://github.com/zimoun/guix-bimsb/blob/master/bimsb/packages/stagi
> ng.scm#L2895-L2941
> 
> Thank you for this suggestion.
> 
> 
> All the best,
> simon

Hi Simon,

I find it sometimes convenient to use a modified version of the
file.path function in R to save me from myself a bit with file paths
while also adding some semantic markup. Perhaps it would also be useful
for building Guix packages? Users would then seldom have to worry about
incorrectly including trailing slashes. I created a code snippet with
my naive implementation here:

https://gitlab.com/snippets/1879185

Maybe there is already a guile library for this sort of thing?

Regards,

Kyle

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri)
  2019-07-26  4:17   ` Kyle Andrews
@ 2019-07-26  9:46     ` Ricardo Wurmus
  0 siblings, 0 replies; 6+ messages in thread
From: Ricardo Wurmus @ 2019-07-26  9:46 UTC (permalink / raw)
  To: Kyle Andrews; +Cc: 36805


Hi Kyle,

> I find it sometimes convenient to use a modified version of the
> file.path function in R to save me from myself a bit with file paths
> while also adding some semantic markup. Perhaps it would also be useful
> for building Guix packages? Users would then seldom have to worry about
> incorrectly including trailing slashes. I created a code snippet with
> my naive implementation here:
>
> https://gitlab.com/snippets/1879185
>
> Maybe there is already a guile library for this sort of thing?

There is, but it’s a little heavier:

    https://gitlab.com/brandoninvergo/guile-file-names

-- 
Ricardo

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#37404] add herbstluftwm window manager package (v0.7.2) to guix (gnu/packages/wm.scm)
  2019-07-25  3:13 [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri) Kyle Andrews
  2019-07-25 13:48 ` zimoun
@ 2019-09-14 21:04 ` Kyle Andrews
  2019-09-16  8:57   ` bug#37404: " Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Kyle Andrews @ 2019-09-14 21:04 UTC (permalink / raw)
  To: 37404

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

I'd like to provide a package definition for the herbstluftwm window
manager so that it may be included into guix. Please see the attached
patch. 

Regards,

Kyle Andrews

[-- Attachment #2: 0001-Add-herbstluftwm-to-the-list-of-available-window-man.patch --]
[-- Type: text/x-patch, Size: 2966 bytes --]

From 2d8537fc42c3424024d2f20aeb618e2ad1b5998c Mon Sep 17 00:00:00 2001
From: Kyle Andrews <kyle.c.andrews@gmail.com>
Date: Sat, 14 Sep 2019 15:43:53 -0400
Subject: [PATCH] Add herbstluftwm to the list of available window managers.

---
 gnu/packages/wm.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index c4b15cc755..d81a916ff3 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -89,6 +89,7 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages serialization)
+  #:use-module (gnu packages bash)
   #:use-module (gnu packages commencement) ; TODO remove when default gcc version >=7
   #:use-module (guix download)
   #:use-module (guix git-download))
@@ -128,6 +129,67 @@
 the leaves of a full binary tree.")
     (license license:bsd-2)))
 
+
+(define-public herbstluftwm
+  (package
+    (name "herbstluftwm")
+    (version "0.7.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://herbstluftwm.org/tarballs/herbstluftwm-"
+			   version
+			   ".tar.gz"))
+       (sha256
+	(base32
+	 "1kc18aj9j3nfz6fj4qxg9s3gg4jvn6kzi3ii24hfm0vqdpy17xnz"))
+       (file-name (string-append "herbstluftwm-" version ".tar.gz"))))
+     (build-system gnu-build-system)
+     (inputs `(("dzen"        ,dzen)
+	       ("dmenu"       ,dmenu)
+	       ("glib"        ,glib)
+	       ("glibmm"      ,glibmm)
+	       ("xterm"       ,xterm)
+	       ("bash"        ,bash)
+	       ("xsetroot"    ,xsetroot)
+	       ("libx11"      ,libx11)
+	       ("libxext"     ,libxext)
+	       ("libxinerama" ,libxinerama)))
+     (native-inputs
+      `(("pkg-config" ,pkg-config)))
+     (arguments
+      '(#:phases
+	(modify-phases %standard-phases
+	  (delete 'configure)
+	  (delete 'check)
+	  (add-after 'install 'install-xsession
+	    (lambda* (#:key outputs #:allow-other-keys)
+	      (let* ((out (assoc-ref outputs "out"))
+		     (xsessions (string-append out "/share/xsessions")))
+		(mkdir-p xsessions)
+		(call-with-output-file
+		    (string-append xsessions "/herbstluftwm.desktop")
+		  (lambda (port)
+		    (format port "~
+                     [Desktop Entry]~@
+                     Name=herbstluftwm~@
+                     Comment=Manual tiling window manager~@
+                     Exec=~a/bin/herbstluftwm~@
+                     Type=XSession~%" out)))))))
+	#:tests? #f
+	#:make-flags
+	(let ((out (assoc-ref %outputs "out")))
+	  (list "CC=gcc"
+		(string-append "PREFIX=''")
+		(string-append "DESTDIR=" out)
+		(string-append "BASHCOMPLETIONDIR=" out
+			       "/etc/bash_completion.d")))))
+     (synopsis "Herbstluftwm Window Manager for X11")
+     (description "X11 Tiling Window Manager")
+     (home-page "https://herbstluftwm.org")
+     (license license:bsd-2)))
+
+
 (define-public i3status
   (package
     (name "i3status")
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#37404: add herbstluftwm window manager package (v0.7.2) to guix (gnu/packages/wm.scm)
  2019-09-14 21:04 ` [bug#37404] add herbstluftwm window manager package (v0.7.2) to guix (gnu/packages/wm.scm) Kyle Andrews
@ 2019-09-16  8:57   ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2019-09-16  8:57 UTC (permalink / raw)
  To: Kyle Andrews; +Cc: 37404-done

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

Hello Kyle,

Kyle Andrews <kyle.c.andrews@gmail.com> skribis:

> From 2d8537fc42c3424024d2f20aeb618e2ad1b5998c Mon Sep 17 00:00:00 2001
> From: Kyle Andrews <kyle.c.andrews@gmail.com>
> Date: Sat, 14 Sep 2019 15:43:53 -0400
> Subject: [PATCH] Add herbstluftwm to the list of available window managers.
>
> ---
>  gnu/packages/wm.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 62 insertions(+)

I’ve applied it with the minor changes below: removing tabs as reported
by ‘guix lint’, providing a description as per
<https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html>,
removing the Bash input since it’s already there by default, returning a
Boolean from the phase, and adding a copyright line and a commit log.

See <https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html>
if anything is unclear.

Thank you!

Ludo’.


[-- Attachment #2: Type: text/x-patch, Size: 3485 bytes --]

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index d81a916ff3..e19c6c1438 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -21,6 +21,7 @@
 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
 ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
+;;; Copyright © 2019 Kyle Andrews <kyle.c.andrews@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -89,7 +90,6 @@
   #:use-module (gnu packages pretty-print)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages serialization)
-  #:use-module (gnu packages bash)
   #:use-module (gnu packages commencement) ; TODO remove when default gcc version >=7
   #:use-module (guix download)
   #:use-module (guix git-download))
@@ -129,7 +129,6 @@
 the leaves of a full binary tree.")
     (license license:bsd-2)))
 
-
 (define-public herbstluftwm
   (package
     (name "herbstluftwm")
@@ -138,19 +137,18 @@ the leaves of a full binary tree.")
      (origin
        (method url-fetch)
        (uri (string-append "https://herbstluftwm.org/tarballs/herbstluftwm-"
-			   version
-			   ".tar.gz"))
+                           version ".tar.gz"))
        (sha256
         (base32
          "1kc18aj9j3nfz6fj4qxg9s3gg4jvn6kzi3ii24hfm0vqdpy17xnz"))
        (file-name (string-append "herbstluftwm-" version ".tar.gz"))))
     (build-system gnu-build-system)
-     (inputs `(("dzen"        ,dzen)
+    (inputs
+     `(("dzen"        ,dzen)
        ("dmenu"       ,dmenu)
        ("glib"        ,glib)
        ("glibmm"      ,glibmm)
        ("xterm"       ,xterm)
-	       ("bash"        ,bash)
        ("xsetroot"    ,xsetroot)
        ("libx11"      ,libx11)
        ("libxext"     ,libxext)
@@ -175,7 +173,8 @@ the leaves of a full binary tree.")
                      Name=herbstluftwm~@
                      Comment=Manual tiling window manager~@
                      Exec=~a/bin/herbstluftwm~@
-                     Type=XSession~%" out)))))))
+                     Type=XSession~%" out)))
+               #t))))
        #:tests? #f
        #:make-flags
        (let ((out (assoc-ref %outputs "out")))
@@ -184,12 +183,32 @@ the leaves of a full binary tree.")
                (string-append "DESTDIR=" out)
                (string-append "BASHCOMPLETIONDIR=" out
                               "/etc/bash_completion.d")))))
-     (synopsis "Herbstluftwm Window Manager for X11")
-     (description "X11 Tiling Window Manager")
+    (synopsis "Tiling window manager for X11")
+    (description "herbstluftwm is a manual tiling window manager for X11 using
+Xlib and GLib.  Its main features are:
+
+@itemize
+@item
+The layout is based on splitting frames into subframes which can be split
+again or can be filled with windows (similar to i3 or musca).
+
+@item
+Tags (or workspaces or virtual desktops or …) can be added/removed at runtime.
+Each tag contains an own layout.
+
+@item
+Exactly one tag is viewed on each monitor.  The tags are monitor independent
+(similar to Xmonad).
+
+@item
+It is configured at runtime via IPC calls from @command{herbstclient}.  So the
+configuration file is just a script which is run on startup (similar to wmii
+or musca).
+
+@end itemize")
     (home-page "https://herbstluftwm.org")
     (license license:bsd-2)))
 
-
 (define-public i3status
   (package
     (name "i3status")

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-16  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  3:13 [bug#36805] Small patch to remove TODO for (@@ (guix build-system r) bioconductor-uri) Kyle Andrews
2019-07-25 13:48 ` zimoun
2019-07-26  4:17   ` Kyle Andrews
2019-07-26  9:46     ` Ricardo Wurmus
2019-09-14 21:04 ` [bug#37404] add herbstluftwm window manager package (v0.7.2) to guix (gnu/packages/wm.scm) Kyle Andrews
2019-09-16  8:57   ` bug#37404: " Ludovic Courtès

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).