From 821311e23eec64747d68a2e42eeb26e61929d9b0 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Tue, 14 Sep 2021 20:42:34 +0200 Subject: util/nixshell: Add Nix shell for toolchain compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a Nix shell file which provides an environment for compilation of the coreboot toolchain. The Nix shell can be used by running the following command: $ nix-shell --pure util/nixshell/toolchain.nix The `--pure` parameter is optional, but it makes sure that the environment is as minimal as possible and does not contain any unrelated or unneeded software or configuration. Once compiled, the coreboot toolchain can be used without loading the shell environment. If `--pure` is used, SSL connections won't work since the `SSL_CERT_FILE` environment variable is not configured, which makes the build tool unable to download the source files. Thus, let it point to the system certificate store. Change-Id: I341ee28c5451d2c6cb4ff22de67161d99f4ca77a Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/57646 Tested-by: build bot (Jenkins) Reviewed-by: Michael Niewöhner --- util/nixshell/toolchain.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 util/nixshell/toolchain.nix (limited to 'util/nixshell') diff --git a/util/nixshell/toolchain.nix b/util/nixshell/toolchain.nix new file mode 100644 index 0000000000..da252f268a --- /dev/null +++ b/util/nixshell/toolchain.nix @@ -0,0 +1,20 @@ +with import {}; + +stdenvNoCC.mkDerivation { + name = "coreboot-toolchain"; + + buildInputs = [ + bison + curl + flex + git + gnat11 + gnumake + patch + zlib + ]; + + shellHook = '' + export SSL_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" + ''; +} -- cgit v1.2.3