From 1471e0c73968d2062baade43ee2262044eb95e67 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Fri, 30 Sep 2022 16:39:44 -0500 Subject: [PATCH] nim: unescape "\ " before splitting NIX_LDFLAGS Ref #190126 --- pkgs/development/compilers/nim/nixbuild.patch | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/pkgs/development/compilers/nim/nixbuild.patch b/pkgs/development/compilers/nim/nixbuild.patch index bdfd04744e16..afadd16602bd 100644 --- a/pkgs/development/compilers/nim/nixbuild.patch +++ b/pkgs/development/compilers/nim/nixbuild.patch @@ -1,14 +1,3 @@ -commit 164ba50fc74b980f77047080b2ae1ea099ae9b27 -Author: Emery Hemingway -Date: Mon Sep 7 14:09:22 2020 +0200 - - Load libaries by absolute path on NixOS - - If "nixbuild" is defined then choose dynamic runtime libraries by - searching $NIX_LDFLAGS at compile-time. - - Fix #15194 - diff --git a/lib/pure/dynlib.nim b/lib/pure/dynlib.nim index f31ae94dd..debed9c07 100644 --- a/lib/pure/dynlib.nim @@ -37,7 +26,7 @@ index f31ae94dd..debed9c07 100644 + # to enable this behavior by default. + # + var libDirs = split(getEnv("LD_LIBRARY_PATH"), ':') -+ for flag in split(getEnv("NIX_LDFLAGS")): ++ for flag in split(replace(getEnv("NIX_LDFLAGS"), "\\ ", " ")): + if flag.startsWith("-L"): + libDirs.add(flag[2..flag.high]) + for lib in dest: