unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add skalibs, execline.
@ 2015-06-26  0:28 Claes Wallin (韋嘉誠)
  2015-06-28 20:37 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-06-26  0:28 UTC (permalink / raw)
  To: guix-devel

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

Adds the common skalibs library and the execline shell-like language.

I'm wondering if the commands of the language belong in bin or if they
maybe should be in libexec/execline. They have pretty generic names
and might clash with other packages.

Either way I think patch #0003 is important, as it makes a script like:

#!/gnu/store/vragmy67fri71aamzp3ifbxf00n27qyy-execline-2.1.2.2/bin/execlineb -P
foreground { sleep 1 } echo blah

... work at all times without writing
/gnu/store/vragmy67fri71aamzp3ifbxf00n27qyy-execline-2.1.2.2/bin/foreground.
Having access to the language without having to have it in $PATH seems
important.

Having to patch, run and redirect the output of a shell command during
the build to make it compile was a fun excercise, as was adding the
PATH wrapper. :-)

Descriptions are my own, inspired by the originals on the homepages,
as the originals are maybe a bit too self-promoting. :-)

[-- Attachment #2: 0001-gnu-Add-skalibs.patch --]
[-- Type: application/octet-stream, Size: 3133 bytes --]

From 9a290c4e798a4668cae65126d48d301b44b96a69 Mon Sep 17 00:00:00 2001
From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
Date: Thu, 25 Jun 2015 12:00:06 +0200
Subject: [PATCH 1/3] gnu: Add skalibs.

 * gnu/package/skarnet.scm (skalibs): New file.
 * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am            |  1 +
 gnu/packages/skarnet.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 gnu/packages/skarnet.scm

diff --git a/gnu-system.am b/gnu-system.am
index a420d71..7504b2a 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -273,6 +273,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/search.scm			\
   gnu/packages/serveez.scm			\
   gnu/packages/shishi.scm			\
+  gnu/packages/skarnet.scm			\
   gnu/packages/skribilo.scm			\
   gnu/packages/slang.scm			\
   gnu/packages/slim.scm				\
diff --git a/gnu/packages/skarnet.scm b/gnu/packages/skarnet.scm
new file mode 100644
index 0000000..3bdb90a
--- /dev/null
+++ b/gnu/packages/skarnet.scm
@@ -0,0 +1,54 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Claes Wallin <claes.wallin@greatsinodevelopment.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages skarnet)
+  #:use-module (gnu packages)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public skalibs
+  (package
+    (name "skalibs")
+    (version "2.3.5.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://skarnet.org/software/skalibs/skalibs-"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "1m31wph4qr4mqgv51nzwd9nw0x5vmpkcxr48i216wn3dpy3mvxwy"))))
+    (build-system gnu-build-system)
+    (search-paths
+     (list (search-path-specification
+            (variable "CPATH")
+            (files '("include")))
+           (search-path-specification
+            (variable "LIBRARY_PATH")
+            (files '("lib")))))
+    (arguments
+     '(#:configure-flags '("--enable-force-devr") ; do not analyze /dev/random
+       #:tests? #f)) ; no tests exist
+    (home-page "http://skarnet.org/software/skalibs/")
+    (synopsis "Common libraries for skarnet.org software")
+    (description
+     "General-purpose libraries for minimalist C development, used by all
+      skarnet.org software.")
+    (license isc)))
-- 
2.4.3


[-- Attachment #3: 0002-gnu-Add-execline.patch --]
[-- Type: application/octet-stream, Size: 3836 bytes --]

From 75b13e87271f8b8b0f54562a46aa6e7e437aacb9 Mon Sep 17 00:00:00 2001
From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
Date: Thu, 25 Jun 2015 14:47:41 +0200
Subject: [PATCH 2/3] gnu: Add execline.

 * gnu/package/skarnet.scm (execline): New variable.
---
 gnu/packages/patches/execline-fix-gen-deps.patch | 12 ++++++
 gnu/packages/skarnet.scm                         | 50 ++++++++++++++++++++++++
 2 files changed, 62 insertions(+)
 create mode 100644 gnu/packages/patches/execline-fix-gen-deps.patch

diff --git a/gnu/packages/patches/execline-fix-gen-deps.patch b/gnu/packages/patches/execline-fix-gen-deps.patch
new file mode 100644
index 0000000..79bdc95
--- /dev/null
+++ b/gnu/packages/patches/execline-fix-gen-deps.patch
@@ -0,0 +1,12 @@
+diff -NurbB execline-2.1.2.2.orig/tools/gen-deps.sh execline-2.1.2.2/tools/gen-deps.sh
+--- execline-2.1.2.2.orig/tools/gen-deps.sh	2015-01-13 23:18:13.000000000 +0100
++++ execline-2.1.2.2/tools/gen-deps.sh	2015-06-25 23:22:17.527553350 +0200
+@@ -71,7 +71,7 @@
+       if echo $dep | grep -q -- \\.o$ ; then
+         dep="src/$dir/$dep"
+       fi
+-      if echo $dep | grep -q '^\${.*_LIB}' ; then
++      if echo $dep | grep -qE '^\${.*_LIB}|^-l|^\${LIB.*}' ; then
+         libs="$libs $dep"
+       else
+         deps="$deps $dep"
diff --git a/gnu/packages/skarnet.scm b/gnu/packages/skarnet.scm
index 3bdb90a..08ebc7a 100644
--- a/gnu/packages/skarnet.scm
+++ b/gnu/packages/skarnet.scm
@@ -52,3 +52,53 @@
      "General-purpose libraries for minimalist C development, used by all
       skarnet.org software.")
     (license isc)))
+
+(define-public execline
+  (package
+    (name "execline")
+    (version "2.1.2.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://skarnet.org/software/execline/execline-"
+                          version ".tar.gz"))
+      (patches
+       (list (search-patch "execline-fix-gen-deps.patch")))
+      (sha256
+       (base32
+        "01pckac5zijf6icrhwicbmq92yq68gfkf1yl03rr2v4q3cn8r85f"))))
+    (build-system gnu-build-system)
+    (inputs `(("skalibs" ,skalibs)))
+    (arguments
+     '(#:configure-flags (list
+                          (string-append "--with-sysdeps="
+                                         (assoc-ref %build-inputs "skalibs")
+                                         "/lib/skalibs/sysdeps"))
+       #:modules ((guix build utils)
+                  (guix build gnu-build-system)
+                  (ice-9 popen))
+       #:phases (modify-phases %standard-phases
+                  (add-before
+                   'configure 'gen-deps
+                   (lambda _
+                     (let ((in  (open-input-pipe "./tools/gen-deps.sh"))
+                           (out (open-output-file "package/deps.mak")))
+                       (dump-port in out)
+                       (close-pipe in)
+                       (close-port out)))))
+       #:tests? #f)) ; No tests exist.
+    (home-page "http://skarnet.org/software/execline/")
+    (license isc)
+    (synopsis "Non-interactive shell-like language with minimal overhead")
+    (description
+     "Execline is a (non-interactive) scripting language, like sh, but its
+syntax is quite different from a traditional shell syntax.  The execlineb
+program is used strictly as a parser for a text file and generates a single
+command execution with the entire script stored in the argument array.
+The language is a library of binaries useful for the tail call or 
+chain execution style that the parser requires.
+
+It is as powerful as a shell: It features conditional loops,
+getopt-style option handling, filename globbing, and more.  Meanwhile, its
+syntax is unambiguous and simple, allowing a minimal parser, which doesn't
+even stay in memory when parsing is done and execution starts.")))
-- 
2.4.3


[-- Attachment #4: 0003-gnu-make-execline-commands-trivially-available-to-al.patch --]
[-- Type: application/octet-stream, Size: 1429 bytes --]

From e39ab44b8464aa14b25fc8554facd34411b926eb Mon Sep 17 00:00:00 2001
From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
Date: Fri, 26 Jun 2015 00:45:41 +0200
Subject: [PATCH 3/3] gnu: make execline commands trivially available to all
 execline scripts

 * gnu/package/skarnet.scm (execline): wrap execlineb to have its own
                                       .../bin first in PATH
---
 gnu/packages/skarnet.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/skarnet.scm b/gnu/packages/skarnet.scm
index 08ebc7a..a75ca8b 100644
--- a/gnu/packages/skarnet.scm
+++ b/gnu/packages/skarnet.scm
@@ -85,7 +85,14 @@
                            (out (open-output-file "package/deps.mak")))
                        (dump-port in out)
                        (close-pipe in)
-                       (close-port out)))))
+                       (close-port out))))
+                  (add-after
+                   'install 'post-install
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (bin (string-append out "/bin")))
+                      (wrap-program (string-append bin "/execlineb")
+                        `("PATH" ":" prefix (,bin)))))))
        #:tests? #f)) ; No tests exist.
     (home-page "http://skarnet.org/software/execline/")
     (license isc)
-- 
2.4.3


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

* Re: [PATCH] Add skalibs, execline.
  2015-06-26  0:28 [PATCH] Add skalibs, execline Claes Wallin (韋嘉誠)
@ 2015-06-28 20:37 ` Ludovic Courtès
  2015-06-29  9:36   ` Claes Wallin (韋嘉誠)
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2015-06-28 20:37 UTC (permalink / raw)
  To: Claes Wallin (韋嘉誠); +Cc: guix-devel

"Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

> From 9a290c4e798a4668cae65126d48d301b44b96a69 Mon Sep 17 00:00:00 2001
> From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
> Date: Thu, 25 Jun 2015 12:00:06 +0200
> Subject: [PATCH 1/3] gnu: Add skalibs.
>
>  * gnu/package/skarnet.scm (skalibs): New file.
>  * gnu-system.am (GNU_SYSTEM_MODULES): Add it.

[...]

> +    (search-paths
> +     (list (search-path-specification
> +            (variable "CPATH")
> +            (files '("include")))
> +           (search-path-specification
> +            (variable "LIBRARY_PATH")
> +            (files '("lib")))))

This is not needed here (‘gcc’ handles that.)

> +    (synopsis "Common libraries for skarnet.org software")
> +    (description
> +     "General-purpose libraries for minimalist C development, used by all
> +      skarnet.org software.")
   ^^^^^^
Please remove extra space here.

Also, what about something like:

  This package provides lightweight C libraries for <list examples of
  features, like data structures and such>.  They are used by
  skarnet.org software.

> From 75b13e87271f8b8b0f54562a46aa6e7e437aacb9 Mon Sep 17 00:00:00 2001
> From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
> Date: Thu, 25 Jun 2015 14:47:41 +0200
> Subject: [PATCH 2/3] gnu: Add execline.
>
>  * gnu/package/skarnet.scm (execline): New variable.
  ^
Extra space.

> diff --git a/gnu/packages/patches/execline-fix-gen-deps.patch b/gnu/packages/patches/execline-fix-gen-deps.patch
> new file mode 100644
> index 0000000..79bdc95
> --- /dev/null
> +++ b/gnu/packages/patches/execline-fix-gen-deps.patch
> @@ -0,0 +1,12 @@

Please start the .patch with a brief description of what it does, and
its upstream status (like “Upstream commit XYZ”, or “Submitted upstream
at http://...”.)

> +       #:modules ((guix build utils)
> +                  (guix build gnu-build-system)
> +                  (ice-9 popen))

Replace the first two with:

  ,@%gnu-build-system-modules

and use a backquote instead of a quote in ‘arguments.’

> +     "Execline is a (non-interactive) scripting language, like sh, but its
> +syntax is quite different from a traditional shell syntax.  The execlineb
> +program is used strictly as a parser for a text file and generates a single
> +command execution with the entire script stored in the argument array.
> +The language is a library of binaries useful for the tail call or 
> +chain execution style that the parser requires.
> +
> +It is as powerful as a shell: It features conditional loops,
> +getopt-style option handling, filename globbing, and more.  Meanwhile, its
> +syntax is unambiguous and simple, allowing a minimal parser, which doesn't
> +even stay in memory when parsing is done and execution starts.")))

s/filename/file name/
It would be nice to make it a couple of lines shorter.

> From e39ab44b8464aa14b25fc8554facd34411b926eb Mon Sep 17 00:00:00 2001
> From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
> Date: Fri, 26 Jun 2015 00:45:41 +0200
> Subject: [PATCH 3/3] gnu: make execline commands trivially available to all
>  execline scripts
>
>  * gnu/package/skarnet.scm (execline): wrap execlineb to have its own
>                                        .../bin first in PATH

LGTM, but please merge it with the previous patch.

Could you send updated patches?

Thank you!

Ludo’.

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

* Re: [PATCH] Add skalibs, execline.
  2015-06-28 20:37 ` Ludovic Courtès
@ 2015-06-29  9:36   ` Claes Wallin (韋嘉誠)
  2015-07-01 13:32     ` Ludovic Courtès
  2015-07-06 20:57     ` Claes Wallin (韋嘉誠)
  0 siblings, 2 replies; 10+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-06-29  9:36 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Jun 28, 2015 10:38 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
> "Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

> > +    (search-paths
> > +     (list (search-path-specification
> > +            (variable "CPATH")
> > +            (files '("include")))
> > +           (search-path-specification
> > +            (variable "LIBRARY_PATH")
> > +            (files '("lib")))))
>
> This is not needed here (‘gcc’ handles that.)

Huh. It seemed to fix something for me, but must be something else I
changed then.

But that probably explains something else. I'm working on s6, and it
expects -lexecline to work. Currently I'm feeding its configure
"--with-lib=.../lib/execline", would be nice to get that done in
execline instead. Modifying LIBRARY_PATH has no effect, what do I need
to do to override gcc?

> > +    (synopsis "Common libraries for skarnet.org software")
> > +    (description
> > +     "General-purpose libraries for minimalist C development, used by all
> > +      skarnet.org software.")
>    ^^^^^^
> Please remove extra space here.
>
> Also, what about something like:
>
>   This package provides lightweight C libraries for <list examples of
>   features, like data structures and such>.  They are used by
>   skarnet.org software.

I'll look into it.

> >  * gnu/package/skarnet.scm (execline): New variable.
>   ^
> Extra space.

Oops.

> > diff --git a/gnu/packages/patches/execline-fix-gen-deps.patch b/gnu/packages/patches/execline-fix-gen-deps.patch
> > new file mode 100644
> > index 0000000..79bdc95
> > --- /dev/null
> > +++ b/gnu/packages/patches/execline-fix-gen-deps.patch
> > @@ -0,0 +1,12 @@
>
> Please start the .patch with a brief description of what it does, and
> its upstream status (like “Upstream commit XYZ”, or “Submitted upstream
> at http://...”.)

Ok. I'll rename it too, as s6 turned out to need the same patch as
well. It's not guix-specific, they actually don't compile from source.
It's funny.

> > +       #:modules ((guix build utils)
> > +                  (guix build gnu-build-system)
> > +                  (ice-9 popen))
>
> Replace the first two with:
>
>   ,@%gnu-build-system-modules

Aha, cool.

> and use a backquote instead of a quote in ‘arguments.’

Yeah, of course.

> > +     "Execline is a (non-interactive) scripting language, like sh, but its
> > +syntax is quite different from a traditional shell syntax.  The execlineb
> > +program is used strictly as a parser for a text file and generates a single
> > +command execution with the entire script stored in the argument array.
> > +The language is a library of binaries useful for the tail call or
> > +chain execution style that the parser requires.
> > +
> > +It is as powerful as a shell: It features conditional loops,
> > +getopt-style option handling, filename globbing, and more.  Meanwhile, its
> > +syntax is unambiguous and simple, allowing a minimal parser, which doesn't
> > +even stay in memory when parsing is done and execution starts.")))
>
> s/filename/file name/
> It would be nice to make it a couple of lines shorter.

Yeah. I'll spend some more effort on removing what can be removed.

> >  * gnu/package/skarnet.scm (execline): wrap execlineb to have its own
> >                                        .../bin first in PATH
>
> LGTM, but please merge it with the previous patch.

Ok.

> Could you send updated patches?

Will do!

> Thank you!

Thank *you*!

-- 
   /c

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

* Re: [PATCH] Add skalibs, execline.
  2015-06-29  9:36   ` Claes Wallin (韋嘉誠)
@ 2015-07-01 13:32     ` Ludovic Courtès
  2015-07-01 17:03       ` Claes Wallin (韋嘉誠)
  2015-07-06 20:57     ` Claes Wallin (韋嘉誠)
  1 sibling, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2015-07-01 13:32 UTC (permalink / raw)
  To: Claes Wallin (韋嘉誠); +Cc: guix-devel

"Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

> On Jun 28, 2015 10:38 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
>> "Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:
>
>> > +    (search-paths
>> > +     (list (search-path-specification
>> > +            (variable "CPATH")
>> > +            (files '("include")))
>> > +           (search-path-specification
>> > +            (variable "LIBRARY_PATH")
>> > +            (files '("lib")))))
>>
>> This is not needed here (‘gcc’ handles that.)
>
> Huh. It seemed to fix something for me, but must be something else I
> changed then.
>
> But that probably explains something else. I'm working on s6, and it
> expects -lexecline to work. Currently I'm feeding its configure
> "--with-lib=.../lib/execline", would be nice to get that done in
> execline instead. Modifying LIBRARY_PATH has no effect, what do I need
> to do to override gcc?

LIBRARY_PATH is automatically set to contains all the lib/
sub-directories, so nothing special is needed.  The problem probably
lies elsewhere, maybe in the build system of s6.

HTH,
Ludo’.

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

* Re: [PATCH] Add skalibs, execline.
  2015-07-01 13:32     ` Ludovic Courtès
@ 2015-07-01 17:03       ` Claes Wallin (韋嘉誠)
  2015-07-04 15:14         ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-07-01 17:03 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On Jul 1, 2015 3:32 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:

> > I'm working on s6, and it
> > expects -lexecline to work. Currently I'm feeding its configure
> > "--with-lib=.../lib/execline", would be nice to get that done in
> > execline instead. Modifying LIBRARY_PATH has no effect, what do I need
> > to do to override gcc?
>
> LIBRARY_PATH is automatically set to contains all the lib/
> sub-directories, so nothing special is needed.  The problem probably
> lies elsewhere, maybe in the build system of s6.

If I do 'guix environment s6' with s6 having execline as an input, only
.../...execline.../lib is in LIBRARY_PATH, .../lib/execline isn't.

[-- Attachment #2: Type: text/html, Size: 879 bytes --]

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

* Re: [PATCH] Add skalibs, execline.
  2015-07-01 17:03       ` Claes Wallin (韋嘉誠)
@ 2015-07-04 15:14         ` Ludovic Courtès
  2015-07-04 15:50           ` Claes Wallin (韋嘉誠)
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2015-07-04 15:14 UTC (permalink / raw)
  To: Claes Wallin (韋嘉誠); +Cc: guix-devel

"Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

> On Jul 1, 2015 3:32 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
>
>> > I'm working on s6, and it
>> > expects -lexecline to work. Currently I'm feeding its configure
>> > "--with-lib=.../lib/execline", would be nice to get that done in
>> > execline instead. Modifying LIBRARY_PATH has no effect, what do I need
>> > to do to override gcc?
>>
>> LIBRARY_PATH is automatically set to contains all the lib/
>> sub-directories, so nothing special is needed.  The problem probably
>> lies elsewhere, maybe in the build system of s6.
>
> If I do 'guix environment s6' with s6 having execline as an input, only
> .../...execline.../lib is in LIBRARY_PATH, .../lib/execline isn't.

I see.  Then I think passing --with-lib to s6’s configure script is the
right thing.

Alternately, if you think other packages will need this in the future,
you could pass execline’s configure something like --libdir=PREFIX/lib
to have the library installed to that place instead of
PREFIX/lib/libexec.

Could, you send an updated patch?

TIA!

Ludo’.

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

* Re: [PATCH] Add skalibs, execline.
  2015-07-04 15:14         ` Ludovic Courtès
@ 2015-07-04 15:50           ` Claes Wallin (韋嘉誠)
  0 siblings, 0 replies; 10+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-07-04 15:50 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On Jul 4, 2015 5:14 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
> "Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

> >> > I'm working on s6, and it
> >> > expects -lexecline to work. Currently I'm feeding its configure
> >> > "--with-lib=.../lib/execline", would be nice to get that done in
> >> > execline instead. Modifying LIBRARY_PATH has no effect, what do I
need
> >> > to do to override gcc?
> >>
> >> LIBRARY_PATH is automatically set to contains all the lib/
> >> sub-directories, so nothing special is needed.  The problem probably
> >> lies elsewhere, maybe in the build system of s6.
> >
> > If I do 'guix environment s6' with s6 having execline as an input, only
> > .../...execline.../lib is in LIBRARY_PATH, .../lib/execline isn't.
>
> I see.  Then I think passing --with-lib to s6’s configure script is the
> right thing.
>
> Alternately, if you think other packages will need this in the future,
> you could pass execline’s configure something like --libdir=PREFIX/lib
> to have the library installed to that place instead of
> PREFIX/lib/libexec.

Ok, that's another approach that makes sense. It is probably getting that
now but insisting on putting it in a subdir. Will look into it.

> Could, you send an updated patch?
>
> TIA!

Vacation is here and next week is hack week in the country-side. If I'm
successful, maybe I can even snare one or two more people to add packages!
There will be at least one old LISP geek there and I'm already working on
him. :-)

[-- Attachment #2: Type: text/html, Size: 2015 bytes --]

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

* Re: [PATCH] Add skalibs, execline.
  2015-06-29  9:36   ` Claes Wallin (韋嘉誠)
  2015-07-01 13:32     ` Ludovic Courtès
@ 2015-07-06 20:57     ` Claes Wallin (韋嘉誠)
  2015-07-12 20:56       ` Ludovic Courtès
  1 sibling, 1 reply; 10+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-07-06 20:57 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On Mon, Jun 29, 2015 at 11:36 AM, Claes Wallin (韋嘉誠)
<gnu@clacke.user.lysator.liu.se> wrote:
> On Jun 28, 2015 10:38 PM, "Ludovic Courtès" <ludo@gnu.org> wrote:
>> "Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

>> Please start the .patch with a brief description of what it does, and
>> its upstream status (like “Upstream commit XYZ”, or “Submitted upstream
>> at http://...”.)
>
> Ok. I'll rename it too, as s6 turned out to need the same patch as
> well. It's not guix-specific, they actually don't compile from source.
> It's funny.

After talking with the author, an explicit --with-lib made the problem
go away, no patch necessary. Apparently GNU make has a special case
where it knows how to interpret -lmylib listed as a dependency.


>> > +       #:modules ((guix build utils)
>> > +                  (guix build gnu-build-system)
>> > +                  (ice-9 popen))
>>
>> Replace the first two with:
>>
>>   ,@%gnu-build-system-modules

... so this part is not even necessary any more.


>> Could you send updated patches?
>
> Will do!

And here they are. I improved (shortened) the wording for the
descriptions and fixed the formatting for the commit message.

[-- Attachment #2: 0001-gnu-Add-skalibs.patch --]
[-- Type: application/octet-stream, Size: 3078 bytes --]

From b9205ac506a12a7fe2193a9b9e02a371a26021d6 Mon Sep 17 00:00:00 2001
From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
Date: Thu, 25 Jun 2015 12:00:06 +0200
Subject: [PATCH 1/2] gnu: Add skalibs.

* gnu/package/skarnet.scm (skalibs): New file.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am            |  1 +
 gnu/packages/skarnet.scm | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
 create mode 100644 gnu/packages/skarnet.scm

diff --git a/gnu-system.am b/gnu-system.am
index 7e25f6f..b54e298 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -272,6 +272,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/search.scm			\
   gnu/packages/serveez.scm			\
   gnu/packages/shishi.scm			\
+  gnu/packages/skarnet.scm			\
   gnu/packages/skribilo.scm			\
   gnu/packages/slang.scm			\
   gnu/packages/slim.scm				\
diff --git a/gnu/packages/skarnet.scm b/gnu/packages/skarnet.scm
new file mode 100644
index 0000000..c9b0361
--- /dev/null
+++ b/gnu/packages/skarnet.scm
@@ -0,0 +1,49 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Claes Wallin <claes.wallin@greatsinodevelopment.com>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages skarnet)
+  #:use-module (gnu packages)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public skalibs
+  (package
+    (name "skalibs")
+    (version "2.3.5.1")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://skarnet.org/software/skalibs/skalibs-"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "1m31wph4qr4mqgv51nzwd9nw0x5vmpkcxr48i216wn3dpy3mvxwy"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("--enable-force-devr") ; do not analyze /dev/random
+       #:tests? #f)) ; no tests exist
+    (home-page "http://skarnet.org/software/skalibs/")
+    (synopsis "Platform abstraction libraries for skarnet.org software")
+    (description
+     "Lightweight C libraries isolating the developer from portability issues,
+providing a unified systems API on all platforms, including primitive
+data types, cryptography and POSIX concepts like sockets and file
+system operations.  Used by all skarnet.org software.")
+    (license isc)))
-- 
2.4.3


[-- Attachment #3: 0002-gnu-Add-execline.patch --]
[-- Type: application/octet-stream, Size: 2772 bytes --]

From 1895979db244399f1e24c60f7a931ea551bec772 Mon Sep 17 00:00:00 2001
From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
Date: Thu, 25 Jun 2015 14:47:41 +0200
Subject: [PATCH 2/2] gnu: Add execline.

* gnu/package/skarnet.scm (execline): New variable.
---
 gnu/packages/skarnet.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/skarnet.scm b/gnu/packages/skarnet.scm
index c9b0361..5362893 100644
--- a/gnu/packages/skarnet.scm
+++ b/gnu/packages/skarnet.scm
@@ -47,3 +47,46 @@ providing a unified systems API on all platforms, including primitive
 data types, cryptography and POSIX concepts like sockets and file
 system operations.  Used by all skarnet.org software.")
     (license isc)))
+
+(define-public execline
+  (package
+    (name "execline")
+    (version "2.1.2.2")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "http://skarnet.org/software/execline/execline-"
+                          version ".tar.gz"))
+      (sha256
+       (base32
+        "01pckac5zijf6icrhwicbmq92yq68gfkf1yl03rr2v4q3cn8r85f"))))
+    (build-system gnu-build-system)
+    (inputs `(("skalibs" ,skalibs)))
+    (arguments
+     '(#:configure-flags (list
+                          (string-append "--with-lib="
+                                         (assoc-ref %build-inputs "skalibs")
+                                         "/lib/skalibs")
+                          (string-append "--with-sysdeps="
+                                         (assoc-ref %build-inputs "skalibs")
+                                         "/lib/skalibs/sysdeps"))
+       #:phases (modify-phases %standard-phases
+                  (add-after
+                   'install 'post-install
+                   (lambda* (#:key inputs outputs #:allow-other-keys)
+                    (let* ((out (assoc-ref outputs "out"))
+                           (bin (string-append out "/bin")))
+                      (wrap-program (string-append bin "/execlineb")
+                        `("PATH" ":" prefix (,bin)))))))
+       #:tests? #f)) ; No tests exist.
+    (home-page "http://skarnet.org/software/execline/")
+    (license isc)
+    (synopsis "Non-interactive shell-like language with minimal overhead")
+    (description
+     "Execline is a (non-interactive) scripting language, separated into a
+parser (execlineb) and a set of commands meant to execute one another in a
+chain-execution fashion, storing the whole script in the argument array.
+It features conditional loops, getopt-style option handling, file name
+globbing, redirection and other shell concepts, expressed as discrete commands
+rather than in special syntax, minimizing runtime footprint and
+complexity.")))
-- 
2.4.3


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

* Re: [PATCH] Add skalibs, execline.
  2015-07-06 20:57     ` Claes Wallin (韋嘉誠)
@ 2015-07-12 20:56       ` Ludovic Courtès
  2015-07-13 10:38         ` Claes Wallin (韋嘉誠)
  0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Courtès @ 2015-07-12 20:56 UTC (permalink / raw)
  To: Claes Wallin (韋嘉誠); +Cc: guix-devel

"Claes Wallin (韋嘉誠)" <gnu@clacke.user.lysator.liu.se> skribis:

> From b9205ac506a12a7fe2193a9b9e02a371a26021d6 Mon Sep 17 00:00:00 2001
> From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
> Date: Thu, 25 Jun 2015 12:00:06 +0200
> Subject: [PATCH 1/2] gnu: Add skalibs.
>
> * gnu/package/skarnet.scm (skalibs): New file.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.

Applied with a slight change to the description to make it a sentence.

> From 1895979db244399f1e24c60f7a931ea551bec772 Mon Sep 17 00:00:00 2001
> From: Claes Wallin <claes.wallin@greatsinodevelopment.com>
> Date: Thu, 25 Jun 2015 14:47:41 +0200
> Subject: [PATCH 2/2] gnu: Add execline.
>
> * gnu/package/skarnet.scm (execline): New variable.

Finally applied as well.

Thanks, and sorry for the delay!

Ludo’.

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

* Re: [PATCH] Add skalibs, execline.
  2015-07-12 20:56       ` Ludovic Courtès
@ 2015-07-13 10:38         ` Claes Wallin (韋嘉誠)
  0 siblings, 0 replies; 10+ messages in thread
From: Claes Wallin (韋嘉誠) @ 2015-07-13 10:38 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On 12-Jul-2015 10:57 pm, "Ludovic Courtès" <ludo@gnu.org> wrote:

> > * gnu/package/skarnet.scm (skalibs): New file.
> > * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
>
> Applied with a slight change to the description to make it a sentence.

> > * gnu/package/skarnet.scm (execline): New variable.
>
> Finally applied as well.
>
> Thanks, and sorry for the delay!

Thanks for patiently guiding me through the process!

[-- Attachment #2: Type: text/html, Size: 649 bytes --]

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

end of thread, other threads:[~2015-07-13 10:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26  0:28 [PATCH] Add skalibs, execline Claes Wallin (韋嘉誠)
2015-06-28 20:37 ` Ludovic Courtès
2015-06-29  9:36   ` Claes Wallin (韋嘉誠)
2015-07-01 13:32     ` Ludovic Courtès
2015-07-01 17:03       ` Claes Wallin (韋嘉誠)
2015-07-04 15:14         ` Ludovic Courtès
2015-07-04 15:50           ` Claes Wallin (韋嘉誠)
2015-07-06 20:57     ` Claes Wallin (韋嘉誠)
2015-07-12 20:56       ` Ludovic Courtès
2015-07-13 10:38         ` Claes Wallin (韋嘉誠)

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