{ lib, stdenv, mkMesonLibrary, unixtools, nix-util, boost, curl, aws-sdk-cpp, libseccomp, nlohmann_json, sqlite, busybox-sandbox-shell ? null, # Configuration Options version, embeddedSandboxShell ? stdenv.hostPlatform.isStatic, }: mkMesonLibrary (finalAttrs: { pname = "nix-store"; inherit version; workDir = ./.; nativeBuildInputs = lib.optional embeddedSandboxShell unixtools.hexdump; buildInputs = [ boost curl sqlite ] ++ lib.optional stdenv.hostPlatform.isLinux libseccomp # There have been issues building these dependencies ++ lib.optional ( stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin) ) aws-sdk-cpp; propagatedBuildInputs = [ nix-util nlohmann_json ]; mesonFlags = [ (lib.mesonEnable "seccomp-sandboxing" stdenv.hostPlatform.isLinux) (lib.mesonBool "embedded-sandbox-shell" embeddedSandboxShell) ] ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox") ]; meta = { platforms = lib.platforms.unix ++ lib.platforms.windows; }; })