1
0
forked from tribes/guix

Compare commits

...

3 Commits

Author SHA1 Message Date
Jan (janneke) Nieuwenhuizen 89a8bd9257 gnu: commencement: mes-boot: Use new package style.
* gnu/packages/commencement.scm (mes-boot)[arguments]: Use gexp for modify
phases.
2022-05-14 21:39:06 +02:00
Jan (janneke) Nieuwenhuizen f99f4a2257 gnu: commencement: stage0-posix: Use new package style.
* gnu/packages/commencement.scm (stage0-posix)[arguments]: Also use gexps for
inputs and output.
2022-05-14 21:35:00 +02:00
Jan (janneke) Nieuwenhuizen 02874b2a43 gnu: commencement: bootstrap-seeds: Use new package style.
* gnu/packages/commencement.scm (bootstrap-seeds)[arguments]: Also use gexps
for inputs and output.
2022-05-14 21:33:33 +02:00
+60 -59
View File
@@ -289,9 +289,9 @@ pure Scheme to Tar and decompression in one easy step.")
#:builder #:builder
#~(begin #~(begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let ((source (assoc-ref %build-inputs "source")) (let ((source #$(package-source this-package))
(tar (assoc-ref %build-inputs "bootar")) (tar #$(this-package-native-input "bootar"))
(out (assoc-ref %outputs "out"))) (out #$output))
(setenv "PATH" (string-append tar "/bin:")) (setenv "PATH" (string-append tar "/bin:"))
(invoke "tar" "xvf" source) (invoke "tar" "xvf" source)
(mkdir-p out) (mkdir-p out)
@@ -365,13 +365,14 @@ hex1, hex2, M1, and M2-Planet.")
#:builder #:builder
#~(begin #~(begin
(use-modules (guix build utils)) (use-modules (guix build utils))
(let* ((bootstrap-seeds (assoc-ref %build-inputs "bootstrap-seeds")) (let* ((bootstrap-seeds #$(this-package-native-input
(source (assoc-ref %build-inputs "source")) "bootstrap-seeds"))
(tar (assoc-ref %build-inputs "bootar")) (source #$(package-source this-package))
(bash (assoc-ref %build-inputs "bash")) (tar #$(this-package-native-input "bootar"))
(coreutils (assoc-ref %build-inputs "coreutils")) (bash #$(this-package-native-input "bash"))
(guile (assoc-ref %build-inputs "guile")) (coreutils #$(this-package-native-input "coreutils"))
(out (assoc-ref %outputs "out")) (guile #$(this-package-input "guile"))
(out #$output)
(bindir (string-append out "/bin")) (bindir (string-append out "/bin"))
(target (or #$(%current-target-system) (target (or #$(%current-target-system)
#$(%current-system))) #$(%current-system)))
@@ -444,55 +445,55 @@ MesCC-Tools), and finally M2-Planet.")
(snippet #f)))) (snippet #f))))
,@(%boot-gash-inputs))) ,@(%boot-gash-inputs)))
(arguments (arguments
`(#:implicit-inputs? #f (list
#:tests? #f #:implicit-inputs? #f
#:guile ,%bootstrap-guile #:tests? #f
#:strip-binaries? #f ;no strip yet #:guile %bootstrap-guile
#:phases #:strip-binaries? #f ;no strip yet
(modify-phases %standard-phases #:phases
(add-after 'unpack 'unpack-seeds #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'unpack-seeds
(let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))) (lambda _
(with-directory-excursion ".." (let ((nyacc-source #$(this-package-native-input "nyacc-source")))
(invoke "tar" "-xvf" nyacc-source))))) (with-directory-excursion ".."
(replace 'configure (invoke "tar" "-xvf" nyacc-source)))))
(lambda* (#:key inputs outputs #:allow-other-keys) (replace 'configure
(let ((out (assoc-ref outputs "out")) (lambda* (#:key inputs outputs #:allow-other-keys)
(gash (assoc-ref inputs "bash")) (let ((out #$output)
(mes (assoc-ref inputs "mes")) (gash #$(this-package-native-input "bash"))
(dir (with-directory-excursion ".." (getcwd)))) (dir (with-directory-excursion ".." (getcwd))))
(setenv "GUILE_LOAD_PATH" (string-append (setenv "GUILE_LOAD_PATH" (string-append
dir "/nyacc-1.00.2/module")) dir "/nyacc-1.00.2/module"))
(invoke "gash" "configure.sh" (invoke "gash" "configure.sh"
(string-append "--prefix=" out) (string-append "--prefix=" out)
"--host=i686-linux-gnu")))) "--host=i686-linux-gnu"))))
(replace 'build (replace 'build
(lambda _ (lambda _
(invoke "gash" "bootstrap.sh"))) (invoke "gash" "bootstrap.sh")))
(delete 'check) (delete 'check)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(substitute* "install.sh" ; show some progress (substitute* "install.sh" ; show some progress
((" -xf") " -xvf") ((" -xf") " -xvf")
(("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd) (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
(string-append space "echo '" cmd "'\n" (string-append space "echo '" cmd "'\n"
space cmd "\n"))) space cmd "\n")))
(invoke "gash" "install.sh") (invoke "gash" "install.sh")
;; Keep ASCII output, for friendlier comparison and bisection ;; Keep ASCII output, for friendlier comparison and bisection
(let* ((out (assoc-ref outputs "out")) (let* ((out #$output)
(cache (string-append out "/lib/cache"))) (cache (string-append out "/lib/cache")))
(define (objects-in-dir dir) (define (objects-in-dir dir)
(find-files dir (find-files dir
(lambda (name stat) (lambda (name stat)
(and (equal? (dirname name) dir) (and (equal? (dirname name) dir)
(or (string-suffix? ".M1" name) (or (string-suffix? ".M1" name)
(string-suffix? ".hex2" name) (string-suffix? ".hex2" name)
(string-suffix? ".o" name) (string-suffix? ".o" name)
(string-suffix? ".s" name)))))) (string-suffix? ".s" name))))))
(for-each (lambda (x) (install-file x cache)) (for-each (lambda (x) (install-file x cache))
(append (objects-in-dir "m2") (append (objects-in-dir "m2")
(objects-in-dir ".") (objects-in-dir ".")
(objects-in-dir "mescc-lib"))))))))) (objects-in-dir "mescc-lib")))))))))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "C_INCLUDE_PATH") (variable "C_INCLUDE_PATH")