mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
Merge pull request #12776 from NixOS/mergify/bp/2.27-maintenance/pr-12772
Light packaging cleanups (backport #12772)
This commit is contained in:
commit
52049bc76e
10 changed files with 32 additions and 29 deletions
|
@ -72,10 +72,6 @@ pkgs.nixComponents.nix-util.overrideAttrs (
|
||||||
src = null;
|
src = null;
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
# Needed for Meson to find Boost.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/86131.
|
|
||||||
BOOST_INCLUDEDIR = "${lib.getDev pkgs.nixDependencies.boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${lib.getLib pkgs.nixDependencies.boost}/lib";
|
|
||||||
# For `make format`, to work without installing pre-commit
|
# For `make format`, to work without installing pre-commit
|
||||||
_NIX_PRE_COMMIT_HOOKS_CONFIG = "${(pkgs.formats.yaml { }).generate "pre-commit-config.yaml"
|
_NIX_PRE_COMMIT_HOOKS_CONFIG = "${(pkgs.formats.yaml { }).generate "pre-commit-config.yaml"
|
||||||
modular.pre-commit.settings.rawConfig
|
modular.pre-commit.settings.rawConfig
|
||||||
|
|
|
@ -113,10 +113,15 @@ headers = [config_h] + files(
|
||||||
'repl.hh',
|
'repl.hh',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/export-all-symbols')
|
||||||
|
subdir('nix-meson-build-support/windows-version')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixcmd',
|
'nixcmd',
|
||||||
sources,
|
sources,
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
|
include_directories : include_dirs,
|
||||||
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -187,6 +187,9 @@ headers = [config_h] + files(
|
||||||
|
|
||||||
subdir('primops')
|
subdir('primops')
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/export-all-symbols')
|
||||||
|
subdir('nix-meson-build-support/windows-version')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixexpr',
|
'nixexpr',
|
||||||
sources,
|
sources,
|
||||||
|
@ -194,6 +197,8 @@ this_library = library(
|
||||||
lexer_tab,
|
lexer_tab,
|
||||||
generated_headers,
|
generated_headers,
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
|
include_directories : include_dirs,
|
||||||
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -81,13 +81,6 @@ mkMesonLibrary (finalAttrs: {
|
||||||
(lib.mesonEnable "gc" enableGC)
|
(lib.mesonEnable "gc" enableGC)
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
|
||||||
# Needed for Meson to find Boost.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/86131.
|
|
||||||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,10 +76,15 @@ headers = files(
|
||||||
'tarball.hh',
|
'tarball.hh',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/export-all-symbols')
|
||||||
|
subdir('nix-meson-build-support/windows-version')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixfetchers',
|
'nixfetchers',
|
||||||
sources,
|
sources,
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
|
include_directories : include_dirs,
|
||||||
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -58,10 +58,15 @@ headers = files(
|
||||||
'flake/url-name.hh',
|
'flake/url-name.hh',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/export-all-symbols')
|
||||||
|
subdir('nix-meson-build-support/windows-version')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixflake',
|
'nixflake',
|
||||||
sources,
|
sources,
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
|
include_directories : include_dirs,
|
||||||
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -82,10 +82,15 @@ headers = [config_h] + files(
|
||||||
'shared.hh',
|
'shared.hh',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
subdir('nix-meson-build-support/export-all-symbols')
|
||||||
|
subdir('nix-meson-build-support/windows-version')
|
||||||
|
|
||||||
this_library = library(
|
this_library = library(
|
||||||
'nixmain',
|
'nixmain',
|
||||||
sources,
|
sources,
|
||||||
dependencies : deps_public + deps_private + deps_other,
|
dependencies : deps_public + deps_private + deps_other,
|
||||||
|
include_directories : include_dirs,
|
||||||
|
link_args: linker_export_flags,
|
||||||
prelink : true, # For C++ static initializers
|
prelink : true, # For C++ static initializers
|
||||||
install : true,
|
install : true,
|
||||||
)
|
)
|
||||||
|
|
|
@ -112,7 +112,8 @@ deps_public += nlohmann_json
|
||||||
sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19')
|
sqlite = dependency('sqlite3', 'sqlite', version : '>=3.6.19')
|
||||||
deps_private += sqlite
|
deps_private += sqlite
|
||||||
|
|
||||||
# AWS C++ SDK has bad pkg-config
|
# AWS C++ SDK has bad pkg-config. See
|
||||||
|
# https://github.com/aws/aws-sdk-cpp/issues/2673 for details.
|
||||||
aws_s3 = dependency('aws-cpp-sdk-s3', required : false)
|
aws_s3 = dependency('aws-cpp-sdk-s3', required : false)
|
||||||
configdata.set('ENABLE_S3', aws_s3.found().to_int())
|
configdata.set('ENABLE_S3', aws_s3.found().to_int())
|
||||||
if aws_s3.found()
|
if aws_s3.found()
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
version,
|
version,
|
||||||
|
|
||||||
embeddedSandboxShell ? stdenv.hostPlatform.isStatic,
|
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
|
let
|
||||||
|
@ -60,9 +64,7 @@ mkMesonLibrary (finalAttrs: {
|
||||||
++ lib.optional stdenv.hostPlatform.isLinux libseccomp
|
++ lib.optional stdenv.hostPlatform.isLinux libseccomp
|
||||||
# There have been issues building these dependencies
|
# There have been issues building these dependencies
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.libs.sandbox
|
++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.libs.sandbox
|
||||||
++ lib.optional (
|
++ lib.optional withAWS aws-sdk-cpp;
|
||||||
stdenv.hostPlatform == stdenv.buildPlatform && (stdenv.isLinux || stdenv.isDarwin)
|
|
||||||
) aws-sdk-cpp;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
nix-util
|
nix-util
|
||||||
|
@ -78,13 +80,6 @@ mkMesonLibrary (finalAttrs: {
|
||||||
(lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox")
|
(lib.mesonOption "sandbox-shell" "${busybox-sandbox-shell}/bin/busybox")
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
|
||||||
# Needed for Meson to find Boost.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/86131.
|
|
||||||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
||||||
};
|
};
|
||||||
|
|
|
@ -58,13 +58,6 @@ mkMesonLibrary (finalAttrs: {
|
||||||
(lib.mesonEnable "cpuid" stdenv.hostPlatform.isx86_64)
|
(lib.mesonEnable "cpuid" stdenv.hostPlatform.isx86_64)
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
|
||||||
# Needed for Meson to find Boost.
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/86131.
|
|
||||||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
|
|
||||||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
platforms = lib.platforms.unix ++ lib.platforms.windows;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue