diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-20T22·31+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-20T23·24+0100 |
commit | 9dfdf16a8d5ff3107c4163ac585ec9be3a2abddb (patch) | |
tree | 293c9c25037ba6d175805cea08716181f2660050 /third_party/nix | |
parent | 43677021e3c285c2ced2075b918da947e13fcb00 (diff) |
fix(3p/nix): Fix build of derivation if cmake is present r/790
cmake automatically runs a configure hook which breaks the build, since this isn't actually a cmake project. This hook is now disabled. Additionally Abseil's sources are linked to an absolute derivation path when the build launches, as opposed to the relative path used for development builds.
Diffstat (limited to 'third_party/nix')
-rw-r--r-- | third_party/nix/default.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/nix/default.nix b/third_party/nix/default.nix index 288ac60a106b..6a05135f63c1 100644 --- a/third_party/nix/default.nix +++ b/third_party/nix/default.nix @@ -18,6 +18,11 @@ in stdenv.mkDerivation { version = "2.3.4"; src = ./.; + # Abseil's sources need to be linked into a subproject. + postUnpack = '' + ln -fs ${pkgs.abseil_cpp.src} nix/subprojects/abseil_cpp + ''; + nativeBuildInputs = with pkgs; [ bison clang-tools @@ -51,6 +56,9 @@ in stdenv.mkDerivation { "-Dsandbox_shell=${pkgs.busybox-sandbox-shell}/bin/busybox" ]; + # cmake is only included to build Abseil and its hook should not run + dontUseCmakeConfigure = true; + # Install the various symlinks to the Nix binary which users expect # to exist. postInstall = '' |