Commit 15ae84bc authored by Timothy Sample's avatar Timothy Sample

Add test for bootstrapping Bash

* tests/bash-without-bash.scm: New file.
* Makefile.am (check-bootstrap): New target.
parent 5287348c
......@@ -40,6 +40,10 @@ test-list: ; @echo $(TESTS)
check-spec:
$(MAKE) $(AM_MAKEFLAGS) -L -C tests/spec check
.PHONY: check-bootstrap
check-bootstrap:
guix build -f tests/bash-without-bash.scm
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
......
(use-modules ((gnu packages bash) #:select (bash))
(guix build-system)
(guix packages)
(guix store)
(guix utils)
(ice-9 match))
(define geesh
(load (string-append (current-source-directory) "/../guix.scm")))
(define geesh-with-links
(package
(inherit geesh)
(arguments
(substitute-keyword-arguments (package-arguments geesh)
((#:phases phases '%standard-phases)
`(modify-phases ,phases
(add-after 'install 'link-bash
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(symlink (string-append out "/bin/geesh")
(string-append out "/bin/sh"))
(symlink (string-append out "/bin/geesh")
(string-append out "/bin/bash")))))))))))
(define bash-without-bash
(let ((bash-bag (package->bag bash)))
(bag
(inherit bash-bag)
(build-inputs
`(("bash" ,geesh-with-links)
,@(filter (match-lambda
((name . _)
(not (member name '("bash")))))
(bag-build-inputs bash-bag)))))))
(bag->derivation (open-connection) bash-without-bash)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment