Commit a341e62e authored by AsbjornOlling's avatar AsbjornOlling Committed by Emery Hemingway
Browse files

buildNimPackage: drop dynlib patch on win builds

omit windows build from dynamic linking patch to avoid cyclic import
this makes it possible to cross-compile for windows using buildNimPackage
parent ea8f0141
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ index f31ae94dd..debed9c07 100644
 
 import strutils
 
+when defined(nixbuild):
+when defined(nixbuild) and not defined(windows):
+  import os
+
 type
@@ -16,7 +16,7 @@ index f31ae94dd..debed9c07 100644
       libCandidates(prefix & middle & suffix, dest)
   else:
     add(dest, s)
+  when defined(nixbuild):
+  when defined(nixbuild) and not defined(windows):
+    # Nix doesn't have a global library directory so
+    # load libraries using an absolute path if one
+    # can be derived from NIX_LDFLAGS.