GNU bug report logs - #39156
[PATCH] gnu: nim: Fix substitution in stdlib_osproc.c

Previous Next

Package: guix-patches;

Reported by: Jakub Kądziołka <kuba <at> kadziolka.net>

Date: Thu, 16 Jan 2020 22:15:01 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39156 in the body.
You can then email your comments to 39156 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#39156; Package guix-patches. (Thu, 16 Jan 2020 22:15:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 16 Jan 2020 22:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c
Date: Thu, 16 Jan 2020 23:14:41 +0100
* gnu/packages/nim.scm (nim)[arguments](patch-more-shebangs): Patch the
  string length too.
---
 gnu/packages/nim.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/nim.scm b/gnu/packages/nim.scm
index 5694eae63b..22dac0b58a 100644
--- a/gnu/packages/nim.scm
+++ b/gnu/packages/nim.scm
@@ -50,10 +50,12 @@
                  #t)))
            (add-after 'patch-source-shebangs 'patch-more-shebangs
              (lambda _
-               (substitute* (append '("tests/stdlib/tosprocterminate.nim"
-                                      "lib/pure/osproc.nim")
-                                    (find-files "c_code" "stdlib_osproc.c"))
-                 (("/bin/sh") (which "sh")))
+               (let ((sh (which "sh")))
+                 (substitute* '("tests/stdlib/tosprocterminate.nim"
+                                        "lib/pure/osproc.nim")
+                   (("/bin/sh") sh))
+                 (substitute* (find-files "c_code" "stdlib_osproc.c")
+                   (("\"/bin/sh\", 7") (format "~s, ~s" sh (string-length sh)))))
                #t))
            (replace 'build
              (lambda _
-- 
2.24.1





Information forwarded to guix-patches <at> gnu.org:
bug#39156; Package guix-patches. (Tue, 21 Jan 2020 17:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 39156 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 39156 <at> debbugs.gnu.org
Subject: Test case for the patch
Date: Tue, 21 Jan 2020 18:53:08 +0100
I realized that I was somewhat unclear on what benefit this patch
brings. Without the patch, compiling any nim programs is broken, for
example:

~/tmp$ cat > hello.nim
echo("Hello")
~/tmp$ ~/guix/pre-inst-env guix environment --ad-hoc nim -- nim c
hello.nim
Hint: used config file
'/gnu/store/k19xvhqgh3x0f7ax25r15l5bw16lzism-nim-0.17.2/config/nim.cfg'
[Conf]
Hint: system [Processing]
Hint: hello [Processing]
CC: hello
Error: invocation of external compiler program failed. File exists
Additional info: Could not find command: '/gnu/st'. OS error: No such
file or directory 17




Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Tue, 21 Jan 2020 20:31:02 GMT) Full text and rfc822 format available.

Notification sent to Jakub Kądziołka <kuba <at> kadziolka.net>:
bug acknowledged by developer. (Tue, 21 Jan 2020 20:31:02 GMT) Full text and rfc822 format available.

Message #13 received at 39156-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 39156-done <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [bug#39156] [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c
Date: Tue, 21 Jan 2020 21:30:08 +0100
[Message part 1 (text/plain, inline)]
Jakub,

Jakub Kądziołka 写道:
> * gnu/packages/nim.scm (nim)[arguments](patch-more-shebangs): 
> Patch the
>   string length too.

Thanks!  Pushed as 79e074ea10875ff75ca613179c70de12d64b19f5.

I tweaked only the commit message a bit, removing the 
unconventional ‘(patch-more-shebangs)’.  Now I see that Ludo' 
didn't seem to mind in 489703898380ab1a0db86f82c4861a33bf97b5fd. 
Oh well.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 19 Feb 2020 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 39 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.