all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#39156] [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c
@ 2020-01-16 22:14 Jakub Kądziołka
  2020-01-21 17:53 ` [bug#39156] Test case for the patch Jakub Kądziołka
  2020-01-21 20:30 ` bug#39156: [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c Tobias Geerinckx-Rice via Guix-patches via
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kądziołka @ 2020-01-16 22:14 UTC (permalink / raw)
  To: 39156

* 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

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

* [bug#39156] Test case for the patch
  2020-01-16 22:14 [bug#39156] [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c Jakub Kądziołka
@ 2020-01-21 17:53 ` Jakub Kądziołka
  2020-01-21 20:30 ` bug#39156: [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kądziołka @ 2020-01-21 17:53 UTC (permalink / raw)
  To: 39156

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

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

* bug#39156: [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c
  2020-01-16 22:14 [bug#39156] [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c Jakub Kądziołka
  2020-01-21 17:53 ` [bug#39156] Test case for the patch Jakub Kądziołka
@ 2020-01-21 20:30 ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 0 replies; 3+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-01-21 20:30 UTC (permalink / raw)
  To: 39156-done; +Cc: Ludovic Courtès

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

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

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

end of thread, other threads:[~2020-01-21 20:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 22:14 [bug#39156] [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c Jakub Kądziołka
2020-01-21 17:53 ` [bug#39156] Test case for the patch Jakub Kądziołka
2020-01-21 20:30 ` bug#39156: [PATCH] gnu: nim: Fix substitution in stdlib_osproc.c Tobias Geerinckx-Rice via Guix-patches via

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.