diff --git a/flake.nix b/flake.nix index 6ab4c3795..58cd2e254 100644 --- a/flake.nix +++ b/flake.nix @@ -12,16 +12,6 @@ imports = [ inputs.pre-commit-hooks.flakeModule ]; perSystem = { config, self', inputs', pkgs, system, ... }: let - # Link OpenSSL statically into the openssl-sys crate. - openssl_static = pkgs.openssl.override { static = true; }; - - # Wrap Bazel so that the Cargo build can see OpenSSL from nixpkgs. - bazel = import ./tools/wrapped-bazel.nix { - openssl = openssl_static; - bazel = pkgs.bazel; - writeShellScriptBin = pkgs.writeShellScriptBin; - }; - hooks = import ./tools/pre-commit-hooks.nix { inherit pkgs; }; in { @@ -32,8 +22,7 @@ pkgs.cargo pkgs.rustc pkgs.pre-commit - openssl_static # Required explicitly for cargo test support. - bazel + pkgs.bazel pkgs.awscli2 ]; shellHook = '' diff --git a/tools/wrapped-bazel.nix b/tools/wrapped-bazel.nix deleted file mode 100644 index c8f7e671c..000000000 --- a/tools/wrapped-bazel.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ bazel -, writeShellScriptBin - - # Use openssl from nix without explicitly tracking nix store paths in our build - # files. This is required for the openssl-sys crate. -, openssl -}: - -writeShellScriptBin "bazel" '' - -if [[ - "$1" == "build" || - "$1" == "coverage" || - "$1" == "run" || - "$1" == "test" -]]; then - ${bazel}/bin/bazel $1 \ - --action_env=OPENSSL_INCLUDE_DIR="${openssl.dev}/include" \ - --action_env=OPENSSL_LIB_DIR="${openssl.out}/lib" \ - ''${@:2} -else - ${bazel}/bin/bazel $@ -fi''