;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;; Use our very own Guix modules.
(set! %fresh-auto-compile #t)
+ ;; Ignore .go files except for Guile's. This is because our checkout in the
+ ;; store has mtime set to the epoch, and thus .go files look newer, even
+ ;; though they may not correspond. Use 'reverse' so that /gnu/store/…-guile
+ ;; comes before /run/current-system/profile.
+ (set! %load-compiled-path
+ (list
+ (dirname (dirname (search-path (reverse %load-compiled-path)
+ "ice-9/boot-9.go")))))
+
(and=> (assoc-ref (current-source-location) 'filename)
(lambda (file)
(let ((dir (string-append (dirname file) "/../..")))
(mbegin %store-monad
(set-guile-for-build (default-guile))
(system-disk-image
- (operating-system (inherit os)
+ (operating-system (inherit installation-os)
(bootloader (bootloader-configuration
(bootloader u-boot-bootloader)
(target #f))))
(((? string?) (? string?) ...) 'list) ; only build selected list of packages
(_ 'all))) ; build everything
+ (define systems
+ (match (assoc-ref arguments 'systems)
+ (#f %hydra-supported-systems)
+ ((lst ...) lst)
+ ((? string? str) (call-with-input-string str read))))
+
(define (cross-jobs system)
(define (from-32-to-64? target)
;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack
(define (pointless? target)
;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM.
- (and (string-contains target "mingw")
- (not (string=? "x86_64-linux" system))))
+ (match system
+ ((or "x86_64-linux" "i686-linux")
+ (if (string-contains target "mingw")
+ (not (string=? "x86_64-linux" system))
+ #f))
+ (_
+ ;; Don't try to cross-compile from non-Intel platforms: this isn't
+ ;; very useful and these are often brittle configurations.
+ #t)))
(define (either proc1 proc2 proc3)
(lambda (x)
'()))
(else
(error "unknown subset" subset))))
- %hydra-supported-systems)))
+ systems)))