From 0e76cda958a4d3e4bcbb96e171c26b6b3478c6c2 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 10 Feb 2022 16:44:10 +0100 Subject: [PATCH] Fix environment variable usage. --- boot/env.ml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/boot/env.ml b/boot/env.ml index e8521e7..d834a3a 100644 --- a/boot/env.ml +++ b/boot/env.ml @@ -32,17 +32,29 @@ let fail_msg = let fail s = Format.eprintf "%s@\n%!" fail_msg; exit 1 +let path_to_list p = + let sep = if String.equal Sys.os_type "Win32" then ';' else ':' in + String.split_on_char sep p + (* This code needs to be refactored, for now it is just what used to be in envvars *) let guess_coqlib () = Util.getenv_else "COQLIB" (fun () -> let prelude = "theories/Init/Prelude.vo" in - Util.check_file_else - ~dir:Coq_config.coqlibsuffix - ~file:prelude - (fun () -> - if Sys.file_exists (Filename.concat Coq_config.coqlib prelude) - then Coq_config.coqlib - else fail ())) + let coqlibpath = Util.getenv_else "COQLIBPATH" (fun () -> Coq_config.coqlibsuffix) in + let paths = path_to_list coqlibpath in + let valid_paths = + List.filter + (fun dir -> (Util.check_file_else ~dir:dir ~file:prelude (fun () -> "")) <> "") + paths in + match valid_paths with + | [] -> + if Sys.file_exists (Filename.concat Coq_config.coqlib prelude) + then Coq_config.coqlib + else + fail "cannot guess a path for Coq libraries; please use -coqlib option \ + or ensure you have installed the package containing Coq's stdlib (coq-stdlib in OPAM) \ + If you intend to use Coq without a standard library, the -boot -noinit options must be used." + | p::_ -> p) (* Build layout uses coqlib = coqcorelib *) let guess_coqcorelib lib = -- 2.34.0 ion>
path: root/tests/guix-pack.sh
AgeCommit message (Collapse)Author
2022-05-25tests: Fix wrong target triplets.Josselin Poiret
* tests/gexp.scm (ungexp + ungexp-native, input list + ungexp-native, input list splicing + ungexp-native-splicing, gexp list splicinng + ungexp-splicing, gexp->derivation, cross-compilation, gexp->derivation, ungexp-native, gexp->derivation, ungexp + ungexp-native, gexp->derivation, ungexp-native + composed gexps): Change mips64el-linux to mips64el-linux-gnu. * tests/guix-pack.sh: Change arm-unknown-linux-gnueabihf to arm-linux-gnueabihf. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2022-02-18profiles: 'profile-derivation' rejects unsupported packages.Ludovic Courtès
Previously user-facing commands would happily start building packages even if they do not support that system. With this change, all the user-facing commands reject unsupported packages without going further. * guix/profiles.scm (profile-derivation): Add #:allow-unsupported-packages?. Define 'check-supported-packages' and honor #:allow-unsupported-packages?. * tests/guix-pack.sh, tests/guix-package.sh, tests/guix-shell.sh: Ensure that unsupported packages are rejected. * tests/guix-system.sh: Pass "--system=armhf-linux" when attempting to build gnu/system/examples/asus-c201.tmpl.
2020-09-28tests: Simplify shell exit status negation;Eric Bavier
* tests/guix-archive.sh, tests/guix-build-branch.sh, tests/guix-build.sh, tests/guix-daemon.sh, tests/guix-download.sh, tests/guix-environment.sh, tests/guix-gc.sh, tests/guix-git-authenticate.sh, tests/guix-graph.sh, tests/guix-hash.sh, tests/guix-lint.sh, tests/guix-pack-relocatable.sh, tests/guix-pack.sh, tests/guix-package-aliases.sh, tests/guix-package-net.sh, tests/guix-package.sh: Use the shell '!' keyword to negate command exit status in place of 'if ...; then false; else true; fi'