From 80405d06264f0de1c16ee2646388ab501df20628 Mon Sep 17 00:00:00 2001 From: Winter Date: Tue, 26 Mar 2024 22:36:17 -0400 Subject: Stop vendoring toml11 We don't apply any patches to it, and vendoring it locks users into bugs (it hasn't been updated since its introduction in late 2021). Closes https://git.lix.systems/lix-project/lix/issues/164 Change-Id: Ied071c841fc30b0dfb575151afd1e7f66970fdb9 --- package.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'package.nix') diff --git a/package.nix b/package.nix index 3c4971605..a47814bd8 100644 --- a/package.nix +++ b/package.nix @@ -12,6 +12,7 @@ boost, brotli, bzip2, + cmake, curl, doxygen, editline, @@ -35,6 +36,7 @@ pkg-config, rapidcheck, sqlite, + toml11, util-linuxMinimal ? utillinuxMinimal, utillinuxMinimal ? null, xz, @@ -142,6 +144,9 @@ in stdenv.mkDerivation (finalAttrs: { "-Dsandbox-shell=${lib.getBin busybox-sandbox-shell}/bin/busybox" ]; + # We only include CMake so that Meson can locate toml11, which only ships CMake dependency metadata. + dontUseCmakeConfigure = true; + nativeBuildInputs = [ bison flex @@ -164,6 +169,7 @@ in stdenv.mkDerivation (finalAttrs: { ++ lib.optionals buildWithMeson [ meson ninja + cmake ]; buildInputs = [ @@ -178,6 +184,7 @@ in stdenv.mkDerivation (finalAttrs: { boost lowdown libsodium + toml11 ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp busybox-sandbox-shell ] ++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid @@ -239,7 +246,10 @@ in stdenv.mkDerivation (finalAttrs: { ++ lib.optionals (finalAttrs.doCheck || internalApiDocs) testConfigureFlags ++ lib.optional (!canRunInstalled) "--disable-doc-gen" ++ [ (lib.enableFeature internalApiDocs "internal-api-docs") ] - ++ lib.optional (!forDevShell) "--sysconfdir=/etc"; + ++ lib.optional (!forDevShell) "--sysconfdir=/etc" + ++ [ + "TOML11_HEADERS=${lib.getDev toml11}/include" + ]; mesonBuildType = lib.optional (buildWithMeson || forDevShell) "debugoptimized"; -- cgit v1.2.3