Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 61 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 mkMesonLibrary, 5 6 unixtools, 7 8 nix-util, 9 boost, 10 curl, 11 aws-sdk-cpp, 12 libseccomp, 13 nlohmann_json, 14 sqlite, 15 16 busybox-sandbox-shell ? null, 17 18 # Configuration Options 19 20 version, 21 22 embeddedSandboxShell ? stdenv.hostPlatform.isStatic, 23}: 24 25mkMesonLibrary (finalAttrs: { 26 pname = "nix-store"; 27 inherit version; 28 29 workDir = ./.; 30 31 nativeBuildInputs = lib.optional embeddedSandboxShell unixtools.hexdump; 32 33 buildInputs = [ 34 boost 35 curl 36 sqlite 37 ] 38 ++ lib.optional stdenv.hostPlatform.isLinux libseccomp 39 # There have been issues building these dependencies 40 ++ lib.optional ( 41 stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin) 42 ) aws-sdk-cpp; 43 44 propagatedBuildInputs = [ 45 nix-util 46 nlohmann_json 47 ]; 48 49 mesonFlags = [ 50 (lib.mesonEnable "seccomp-sandboxing" stdenv.hostPlatform.isLinux) 51 (lib.mesonBool "embedded-sandbox-shell" embeddedSandboxShell) 52 ] 53 ++ lib.optionals stdenv.hostPlatform.isLinux [ 54 (lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox") 55 ]; 56 57 meta = { 58 platforms = lib.platforms.unix ++ lib.platforms.windows; 59 }; 60 61})