fix(3p/nix): Fix build of derivation if cmake is present

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.
This commit is contained in:
Vincent Ambo 2020-05-20 23:31:50 +01:00
parent 43677021e3
commit 9dfdf16a8d

View file

@ -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 = ''