diff options
author | Oleg Pykhalov <go.wigust@gmail.com> | 2021-10-02 19:05:02 +0300 |
---|---|---|
committer | Oleg Pykhalov <go.wigust@gmail.com> | 2021-10-09 19:24:19 +0300 |
commit | fee0bced7fec2f9950957976a28f033edd4f877c (patch) | |
tree | 1973046ca180f2d3feacfa71eeaf285e4ee7ee84 /tests | |
parent | 5e68f7a7b338951dcc227799a51c59d9ac77c696 (diff) | |
download | guix-fee0bced7fec2f9950957976a28f033edd4f877c.tar.gz |
home: services: configuration: Support file-like objects.
* gnu/home/services/configuration.scm (interpose): Operate only with file-like objects. (string-or-gexp?): Delete procedure. (serialize-string-or-gexp): Rename to 'serialize-file-like'. (text-config?): Call 'file-like' intead of 'string-or-gexp?'. * guix/scripts/home/import.scm: (generate-bash-module+configuration): Don't call slurp-file-gexp. * gnu/home/services/configuration.scm: Move content ... * gnu/services/configuration.scm: here. * gnu/home/services/shells.scm: Delete (gnu home services configuration). * gnu/home/services/xdg.scm: Same. * gnu/local.mk: Same. * tests/guix-home.sh: Test home-bash-service-type and extension with home-bash-extension.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-home.sh | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/guix-home.sh b/tests/guix-home.sh index 0b5deabeb0..e578559c97 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -54,10 +54,13 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT # Test 'guix home reconfigure'. # + printf "# dot-bashrc test file for guix home" > "dot-bashrc" + cat > "home.scm" <<'EOF' (use-modules (guix gexp) (gnu home) (gnu home services) + (gnu home services shells) (gnu services)) (home-environment @@ -68,11 +71,33 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT (list `("config/test.conf" ,(plain-file "tmp-file.txt" - "the content of ~/.config/test.conf"))))))) + "the content of ~/.config/test.conf")))) + + (service home-bash-service-type + (home-bash-configuration + (guix-defaults? #t) + (bashrc + (list + (local-file (string-append (dirname (current-filename)) + "/dot-bashrc")))))) + + (simple-service 'home-bash-service-extension-test + home-bash-service-type + (home-bash-extension + (bashrc + (list + (plain-file + "bashrc-test-config.sh" + "# the content of bashrc-test-config.sh")))))))) EOF guix home reconfigure "${test_directory}/home.scm" test -d "${HOME}/.guix-home" + test -h "${HOME}/.bash_profile" + test -h "${HOME}/.bashrc" + test "$(tail -n 2 "${HOME}/.bashrc")" == "\ +# dot-bashrc test file for guix home +# the content of bashrc-test-config.sh" grep -q "the content of ~/.config/test.conf" "${HOME}/.config/test.conf" # |