mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
For example, instead of doing
#include "nix/store-config.hh"
#include "nix/derived-path.hh"
Now do
#include "nix/store/config.hh"
#include "nix/store/derived-path.hh"
This was originally planned in the issue, and also recent requested by
Eelco.
Most of the change is purely mechanical. There is just one small
additional issue. See how, in the example above, we took this
opportunity to also turn `<comp>-config.hh` into `<comp>/config.hh`.
Well, there was already a `nix/util/config.{cc,hh}`. Even though there
is not a public configuration header for libutil (which also would be
called `nix/util/config.{cc,hh}`) that's still confusing, To avoid any
such confusion, we renamed that to `nix/util/configuration.{cc,hh}`.
Finally, note that the libflake headers already did this, so we didn't
need to do anything to them. We wouldn't want to mistakenly get
`nix/flake/flake/flake.hh`!
Progress on #7876
90 lines
2 KiB
Nix
90 lines
2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
mkMesonLibrary,
|
|
|
|
unixtools,
|
|
darwin,
|
|
|
|
nix-util,
|
|
boost,
|
|
curl,
|
|
aws-sdk-cpp,
|
|
libseccomp,
|
|
nlohmann_json,
|
|
sqlite,
|
|
|
|
busybox-sandbox-shell ? null,
|
|
|
|
# Configuration Options
|
|
|
|
version,
|
|
|
|
embeddedSandboxShell ? stdenv.hostPlatform.isStatic,
|
|
|
|
withAWS ?
|
|
# Default is this way because there have been issues building this dependency
|
|
stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin),
|
|
}:
|
|
|
|
let
|
|
inherit (lib) fileset;
|
|
in
|
|
|
|
mkMesonLibrary (finalAttrs: {
|
|
pname = "nix-store";
|
|
inherit version;
|
|
|
|
workDir = ./.;
|
|
fileset = fileset.unions [
|
|
../../nix-meson-build-support
|
|
./nix-meson-build-support
|
|
../../.version
|
|
./.version
|
|
./meson.build
|
|
./meson.options
|
|
./include/nix/store/meson.build
|
|
./linux/meson.build
|
|
./linux/include/nix/store/meson.build
|
|
./unix/meson.build
|
|
./unix/include/nix/store/meson.build
|
|
./windows/meson.build
|
|
(fileset.fileFilter (file: file.hasExt "cc") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "hh") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "sb") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "md") ./.)
|
|
(fileset.fileFilter (file: file.hasExt "sql") ./.)
|
|
];
|
|
|
|
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.isDarwin darwin.apple_sdk.libs.sandbox
|
|
++ lib.optional withAWS 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;
|
|
};
|
|
|
|
})
|