diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-11-16 09:34:27 +0100 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-11-16 09:34:27 +0100 |
commit | 154d97abdd16674fdebc763351f661bbcdc869a4 (patch) | |
tree | 0277a9380edd1390f16e432283d32499ffed36d1 /gnu/packages/installers.scm | |
parent | e4696c69d75f4fcf54c42beeb928032726bdaf7d (diff) | |
parent | 87e7faa2ae641d8302efc8b90f1e45f43f67f6da (diff) | |
download | guix-154d97abdd16674fdebc763351f661bbcdc869a4.tar.gz |
Merge remote-tracking branch master into core-updates
Diffstat (limited to 'gnu/packages/installers.scm')
-rw-r--r-- | gnu/packages/installers.scm | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm index c987254d61..9229359fdf 100644 --- a/gnu/packages/installers.scm +++ b/gnu/packages/installers.scm @@ -28,7 +28,10 @@ #:use-module (guix utils)) (define (make-nsis machine target-arch nsis-target-type) - (let ((triplet (string-append machine "-" "w64-mingw32"))) + (let* ((triplet (string-append machine "-" "w64-mingw32")) + (xbinutils (cross-binutils triplet)) + (xlibc (cross-libc triplet)) + (xgcc (cross-gcc triplet #:libc xlibc))) (package (name (string-append "nsis-" machine)) (version "3.04") @@ -41,13 +44,14 @@ "1xgllk2mk36ll2509hd31mfq6blgncmdzmwxj3ymrwshdh23d5b0")) (patches (search-patches "nsis-env-passthru.patch")))) (build-system scons-build-system) - (native-inputs `(("xgcc" ,(cross-gcc triplet #:libc (cross-libc triplet))) - ("xbinutils" ,(cross-binutils triplet)) - ("mingw-w64" ,(cross-libc triplet)))) + (native-inputs `(("xgcc" ,xgcc) + ("xbinutils" ,xbinutils) + ("mingw-w64" ,xlibc))) (inputs `(("zlib" ,zlib))) (arguments `(#:scons ,scons-python2 #:modules ((srfi srfi-1) + (srfi srfi-26) (guix build utils) (guix build scons-build-system)) #:tests? #f @@ -92,7 +96,20 @@ ;; CROSS_-prefixed version of env vars (setenv (string-append "CROSS_" env-name) (filter-delimited-string env-val mingw-path?)))) - '("CPLUS_INCLUDE_PATH" "LIBRARY_PATH" "C_INCLUDE_PATH")))) + '("CPATH" "LIBRARY_PATH")) + ;; Hack to place mingw-w64 path at the end of search + ;; paths. Could probably use a specfile and dirafter + (setenv "CROSS_CPLUS_INCLUDE_PATH" + (string-join + `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>) + `("/include/c++" + ,(string-append "/include/c++/" ,triplet) + "/include/c++/backward" + ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>) + '("/include" + "/include-fixed")))) + ,(getenv "CROSS_CPATH")) + ":")))) (add-before 'build 'fix-target-detection (lambda _ ;; NSIS target detection is screwed up, manually |