guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: system: hurd: Add "gnu-perl.scm" fixup script.


From: guix-commits
Subject: 02/05: system: hurd: Add "gnu-perl.scm" fixup script.
Date: Sun, 19 Apr 2020 05:05:23 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit a8aff355e5b0c76bbb8fa4485721e84e55893745
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Fri Apr 17 22:39:57 2020 +0200

    system: hurd: Add "gnu-perl.scm" fixup script.
    
    This allows compiling Guix from git
    
        git clone gnu-anon:guix
        cd guix
        git checkout wip-hurd-vm
        gnu-perl.scm
        PATH=/root/bin:$PATH
        ./bootstrap
        ./configure --localstatedir=/var --sysconfdir=/etc --with-courage
        make
        ./pre-inst-env guix build --no-offload hello
    
    * gnu/system/hurd.scm (gnu-perl.scm): Add perl and m4 fixup script.
---
 gnu/system/hurd.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 66 insertions(+), 3 deletions(-)

diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index b730d49..0c2d703 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -135,7 +135,8 @@
       (append-map input->packages
                   (fold alist-delete (package-direct-inputs guix)
                         '("graphviz" "po4a")))
-      (list gawk diffutils gnu-make m4 tar xz)
+      (list gawk diffutils gnu-make m4 tar xz
+            bootstrap-gcc bootstrap-binutils bootstrap-glibc)
       %base-packages/hurd))))
 
 (define operating-system-accounts
@@ -317,6 +318,63 @@ sshd:x:2:2:sshd:/var/empty:/bin/no-sh
     (with-parameters ((%current-target-system "i586-pc-gnu"))
       (operating-system-activation-script os)))
 
+  (define root-.gitconfig
+    (plain-file "root-.gitconfig"
+                "\
+[url \"git+ssh://git.sv.gnu.org/srv/git/\"]
+       insteadof = gnu:
+[url \"git://git.savannah.gnu.org/\"]
+       insteadof = gnu-anon:\n"))
+
+  (define root-bin-gnu-perl.scm
+    (plain-file "root-bin-gnu-perl.scm"
+                "\
+#! /run/current-system/profile/bin/guile \
+--no-auto-compile
+!#
+
+;; The perl cross-build is faked, which has cross-built autoconf,
+;; automake and texinfo use the build's perl instead of the host.
+
+(use-modules (guix build utils)
+             (guix packages)
+             (guix store))
+
+(let* ((store (open-connection))
+       (bash (run-with-store store
+                     (package-file (@@ (gnu packages bootstrap) 
%bootstrap-coreutils&co))))
+       (m4 (run-with-store store
+                     (package-file (@@ (gnu packages commencement) m4-boot0))))
+       (perl (run-with-store store
+               (package-file (@@ (gnu packages commencement) perl-boot0))))
+       (bin \"/root/bin\"))
+  (mkdir-p bin)
+  (map
+   (lambda (name)
+     (let ((old (string-append \"/run/current-system/profile/bin/\" name))
+           (new (string-append bin \"/\" name)))
+       (copy-file old new)
+       (substitute* new
+         ((\"/gnu/store/[^/]*-bash-[^/]*\") bash)
+         ((\"/gnu/store/[^/]*-m4-[^/]*\") m4)
+         ((\"/gnu/store/[^/]*-perl-5[^/]*\") perl))))
+   '(\"aclocal\"
+     \"autoconf\"
+     \"autoheader\"
+     \"autom4te\"
+     \"automake\"
+     \"autopoint\"
+     \"autoreconf\"
+     \"autoscan\"
+     \"autoupdate\"
+     \"ifnames\"
+     \"makeinfo\")))
+
+(format #t \"Scripts fixed; use
+PATH=/root/bin:$PATH
+export AUTOM4TE=/root/bin/autom4te
+export AUTOHEADER=/root/bin/autoheader\n\")\n"))
+
   (define hurd-directives
     `((directory "/servers")
       ,@(map (lambda (server)
@@ -375,7 +433,10 @@ sshd:x:2:2:sshd:/var/empty:/bin/no-sh
       ("/bin/sh" -> ,(file-append (with-parameters ((%current-target-system
                                                      "i586-pc-gnu"))
                                     bash)
-                                  "/bin/sh"))))
+                                  "/bin/sh"))
+      ("/root/.gitconfig" -> ,root-.gitconfig)
+      (directory "/root/bin")
+      ("/root/bin/gnu-perl.scm" -> ,root-bin-gnu-perl.scm)))
 
   (qemu-image #:file-system-type "ext2"
               #:file-system-options '("-o" "hurd")
@@ -387,7 +448,9 @@ sshd:x:2:2:sshd:/var/empty:/bin/no-sh
                          ("group" ,group)
                          ("shadow" ,shadow)
                          ("shepherd.conf" ,shepherd.conf)
-                         ("boot-activation" ,boot-activation))
+                         ("boot-activation" ,boot-activation)
+                         ("root-.gitconfig" ,root-.gitconfig)
+                         ("root-bin-gnu-perl.scm" ,root-bin-gnu-perl.scm))
               #:copy-inputs? #t
               #:os system-profile
               #:bootcfg-drv grub.cfg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]