From 79e074ea10875ff75ca613179c70de12d64b19f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= Date: Thu, 16 Jan 2020 23:14:41 +0100 Subject: gnu: nim: Fix /bin/sh substitution in C code. * gnu/packages/nim.scm (nim)[arguments]: Patch the string length too. Signed-off-by: Tobias Geerinckx-Rice --- 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 _ -- cgit v1.2.3