> Can you replace occurrences of ‘nixpkgs-derivation*’ by

There is no such function.

(I've attached the diff.)

Nikita

--- bootstrap.scm-orig	2012-12-30 15:50:33.274957192 +0000
+++ bootstrap.scm		2012-12-24 18:18:52.214043993 +0000
@@ -137,6 +137,7 @@
   "Return the name of Glibc's dynamic linker for SYSTEM."
   (cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
         ((string=? system "i686-linux") "/lib/ld-linux.so.2")
+        ((string=? system "mips64el-linux") "/lib/ld.so.1")
         (else (error "dynamic linker name not known for this system"
                      system))))
 
@@ -146,53 +147,56 @@
 ;;;
 
 (define %bootstrap-guile
-  ;; The Guile used to run the build scripts of the initial derivations.
-  ;; It is just unpacked from a tarball containing a pre-built binary.
-  ;; This is typically built using %GUILE-BOOTSTRAP-TARBALL below.
-  ;;
-  ;; XXX: Would need libc's `libnss_files2.so' for proper `getaddrinfo'
-  ;; support (for /etc/services).
-  (let ((raw (build-system
-              (name "raw")
-              (description "Raw build system with direct store access")
-              (build (lambda* (store name source inputs #:key outputs system)
-                       (define (->store file)
-                         (add-to-store store file #t #t "sha256"
-                                       (or (search-bootstrap-binary file
-                                                                    system)
-                                           (error "bootstrap binary not found"
-                                                  file system))))
-
-                       (let* ((tar   (->store "tar"))
-                              (xz    (->store "xz"))
-                              (mkdir (->store "mkdir"))
-                              (bash  (->store "bash"))
-                              (guile (->store "guile-bootstrap-2.0.6.tar.xz"))
-                              (builder
-                               (add-text-to-store store
-                                                  "build-bootstrap-guile.sh"
-                                                  (format #f "
-echo \"unpacking bootstrap Guile to '$out'...\"
-~a $out
-cd $out
-~a -dc < ~a | ~a xv
-
-# Sanity check.
-$out/bin/guile --version~%"
-                                                          mkdir xz guile tar)
-                                                  (list mkdir xz guile tar))))
-                         (derivation store name system
-                                     bash `(,builder) '()
-                                     `((,bash) (,builder)))))))))
-   (package
-     (name "guile-bootstrap")
-     (version "2.0")
-     (source #f)
-     (build-system raw)
-     (synopsis "Bootstrap Guile")
-     (description "Pre-built Guile for bootstrapping purposes.")
-     (home-page #f)
-     (license lgpl3+))))
+  (nixpkgs-derivation "guile" "mips64el-linux"))
+
+;; (define %bootstrap-guile
+;;   ;; The Guile used to run the build scripts of the initial derivations.
+;;   ;; It is just unpacked from a tarball containing a pre-built binary.
+;;   ;; This is typically built using %GUILE-BOOTSTRAP-TARBALL below.
+;;   ;;
+;;   ;; XXX: Would need libc's `libnss_files2.so' for proper `getaddrinfo'
+;;   ;; support (for /etc/services).
+;;   (let ((raw (build-system
+;;               (name "raw")
+;;               (description "Raw build system with direct store access")
+;;               (build (lambda* (store name source inputs #:key outputs system)
+;;                        (define (->store file)
+;;                          (add-to-store store file #t #t "sha256"
+;;                                        (or (search-bootstrap-binary file
+;;                                                                     system)
+;;                                            (error "bootstrap binary not found"
+;;                                                   file system))))
+
+;;                        (let* ((tar   (->store "tar"))
+;;                               (xz    (->store "xz"))
+;;                               (mkdir (->store "mkdir"))
+;;                               (bash  (->store "bash"))
+;;                               (guile (->store "guile-bootstrap-2.0.6.tar.xz"))
+;;                               (builder
+;;                                (add-text-to-store store
+;;                                                   "build-bootstrap-guile.sh"
+;;                                                   (format #f "
+;; echo \"unpacking bootstrap Guile to '$out'...\"
+;; ~a $out
+;; cd $out
+;; ~a -dc < ~a | ~a xv
+
+;; # Sanity check.
+;; $out/bin/guile --version~%"
+;;                                                           mkdir xz guile tar)
+;;                                                   (list mkdir xz guile tar))))
+;;                          (derivation store name system
+;;                                      bash `(,builder) '()
+;;                                      `((,bash) (,builder)))))))))
+;;    (package
+;;      (name "guile-bootstrap")
+;;      (version "2.0")
+;;      (source #f)
+;;      (build-system raw)
+;;      (synopsis "Bootstrap Guile")
+;;      (description "Pre-built Guile for bootstrapping purposes.")
+;;      (home-page #f)
+;;      (license lgpl3+))))
 
 (define %bootstrap-base-url
   ;; This is where the initial binaries come from.
@@ -362,11 +366,21 @@
     (home-page #f)))
 
 (define %bootstrap-inputs
-  ;; The initial, pre-built inputs.  From now on, we can start building our
-  ;; own packages.
-  `(("libc" ,%bootstrap-glibc)
-    ("gcc" ,%bootstrap-gcc)
-    ("binutils" ,%bootstrap-binutils)
-    ("coreutils&co" ,%bootstrap-coreutils&co)))
+  (compile-time-value
+   `(("libc" ,(nixpkgs-derivation "glibc" "mips64el-linux"))
+     ,@(map (lambda (name)
+              (list name (nixpkgs-derivation name "mips64el-linux")))
+            '("gnutar" "gzip" "bzip2" "xz" "patch"
+              "coreutils" "gnused" "gnugrep" "bash"
+              "gawk"                                ; used by `config.status'
+              "gcc" "binutils")))))
+
+;; (define %bootstrap-inputs
+;;   ;; The initial, pre-built inputs.  From now on, we can start building our
+;;   ;; own packages.
+;;   `(("libc" ,%bootstrap-glibc)
+;;     ("gcc" ,%bootstrap-gcc)
+;;     ("binutils" ,%bootstrap-binutils)
+;;     ("coreutils&co" ,%bootstrap-coreutils&co)))
 
 ;;; bootstrap.scm ends here

Attachment: pgp9_W4V7VCKY.pgp
Description: PGP signature

Reply via email to