mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-09 15:58:05 +02:00
More fixes
This commit is contained in:
parent
5ba9f6cec6
commit
479befa76d
30 changed files with 101 additions and 67 deletions
|
@ -324,6 +324,7 @@
|
|||
++ pkgs.nixComponents.nix-internal-api-docs.nativeBuildInputs
|
||||
++ pkgs.nixComponents.nix-external-api-docs.nativeBuildInputs
|
||||
++ [
|
||||
pkgs.buildPackages.cmake
|
||||
modular.pre-commit.settings.package
|
||||
(pkgs.writeScriptBin "pre-commit-hooks-install"
|
||||
modular.pre-commit.settings.installationScript)
|
||||
|
|
|
@ -13,8 +13,8 @@ subproject('libexpr')
|
|||
subproject('libflake')
|
||||
|
||||
# Docs
|
||||
#subproject('internal-api-docs')
|
||||
#subproject('external-api-docs')
|
||||
subproject('internal-api-docs')
|
||||
subproject('external-api-docs')
|
||||
|
||||
# C wrappers
|
||||
subproject('libutil-c')
|
||||
|
|
|
@ -62,9 +62,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -64,9 +64,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -17,18 +17,12 @@ cxx = meson.get_compiler('cpp')
|
|||
subdir('build-utils-meson/deps-lists')
|
||||
|
||||
deps_private_maybe_subproject = [
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
dependency('nix-util'),
|
||||
dependency('nix-util-c'),
|
||||
dependency('nix-util-test-support'),
|
||||
dependency('nix-store'),
|
||||
dependency('nix-store-c'),
|
||||
dependency('nix-store-test-support'),
|
||||
dependency('nix-expr'),
|
||||
dependency('nix-expr-c'),
|
||||
dependency('nix-expr-test-support'),
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
]
|
||||
subdir('build-utils-meson/subprojects')
|
||||
|
||||
subdir('build-utils-meson/export-all-symbols')
|
||||
|
|
|
@ -69,9 +69,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -293,7 +293,7 @@ EvalState::EvalState(
|
|||
)}
|
||||
, callFlakeInternal{internalFS->addFile(
|
||||
CanonPath("call-flake.nix"),
|
||||
#include "flake/call-flake.nix.gen.hh"
|
||||
#include "call-flake.nix.gen.hh"
|
||||
)}
|
||||
, store(store)
|
||||
, buildStore(buildStore ? buildStore : store)
|
||||
|
|
|
@ -47,4 +47,4 @@ $(foreach i, $(wildcard src/libexpr/value/*.hh), \
|
|||
|
||||
$(d)/primops.cc: $(d)/imported-drv-to-derivation.nix.gen.hh
|
||||
|
||||
$(d)/eval.cc: $(d)/primops/derivation.nix.gen.hh $(d)/fetchurl.nix.gen.hh $(d)/flake/call-flake.nix.gen.hh
|
||||
$(d)/eval.cc: $(d)/primops/derivation.nix.gen.hh $(d)/fetchurl.nix.gen.hh $(d)/call-flake.nix.gen.hh
|
||||
|
|
|
@ -55,6 +55,9 @@ if bdw_gc.found()
|
|||
endif
|
||||
configdata.set('HAVE_BOEHMGC', bdw_gc.found().to_int())
|
||||
|
||||
toml11 = dependency('toml11', version : '>=3.7.0', method : 'cmake')
|
||||
deps_other += toml11
|
||||
|
||||
config_h = configure_file(
|
||||
configuration : configdata,
|
||||
output : 'config-expr.hh',
|
||||
|
@ -117,8 +120,7 @@ generated_headers = []
|
|||
foreach header : [
|
||||
'imported-drv-to-derivation.nix',
|
||||
'fetchurl.nix',
|
||||
'flake/call-flake.nix',
|
||||
'primops/derivation.nix',
|
||||
'call-flake.nix',
|
||||
]
|
||||
generated_headers += custom_target(
|
||||
command : [ 'bash', '-c', '{ echo \'R"__NIX_STR(\' && cat @INPUT@ && echo \')__NIX_STR"\'; } > "$1"', '_ignored_argv0', '@OUTPUT@' ],
|
||||
|
@ -142,11 +144,6 @@ sources = files(
|
|||
'nixexpr.cc',
|
||||
'paths.cc',
|
||||
'primops.cc',
|
||||
'primops/context.cc',
|
||||
'primops/fetchClosure.cc',
|
||||
'primops/fetchMercurial.cc',
|
||||
'primops/fetchTree.cc',
|
||||
'primops/fromTOML.cc',
|
||||
'print-ambiguous.cc',
|
||||
'print.cc',
|
||||
'search-path.cc',
|
||||
|
@ -187,6 +184,8 @@ headers = [config_h] + files(
|
|||
'value/context.hh',
|
||||
)
|
||||
|
||||
subdir('primops')
|
||||
|
||||
this_library = library(
|
||||
'nixexpr',
|
||||
sources,
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, bison
|
||||
, flex
|
||||
, cmake # for resolving toml11 dep
|
||||
|
||||
, nix-util
|
||||
, nix-store
|
||||
|
@ -12,6 +15,7 @@
|
|||
, boost
|
||||
, boehmgc
|
||||
, nlohmann_json
|
||||
, toml11
|
||||
|
||||
# Configuration Options
|
||||
|
||||
|
@ -57,8 +61,12 @@ mkDerivation (finalAttrs: {
|
|||
fileset = fileset.unions [
|
||||
./meson.build
|
||||
./meson.options
|
||||
./primops/meson.build
|
||||
(fileset.fileFilter (file: file.hasExt "cc") ./.)
|
||||
(fileset.fileFilter (file: file.hasExt "hh") ./.)
|
||||
./lexer.l
|
||||
./parser.y
|
||||
(fileset.fileFilter (file: file.hasExt "nix") ./.)
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -68,6 +76,13 @@ mkDerivation (finalAttrs: {
|
|||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
bison
|
||||
flex
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
toml11
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -79,9 +94,11 @@ mkDerivation (finalAttrs: {
|
|||
] ++ lib.optional enableGC boehmgc;
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
17
src/libexpr/primops/meson.build
Normal file
17
src/libexpr/primops/meson.build
Normal file
|
@ -0,0 +1,17 @@
|
|||
foreach header : [
|
||||
'derivation.nix',
|
||||
]
|
||||
generated_headers += custom_target(
|
||||
command : [ 'bash', '-c', '{ echo \'R"__NIX_STR(\' && cat @INPUT@ && echo \')__NIX_STR"\'; } > "$1"', '_ignored_argv0', '@OUTPUT@' ],
|
||||
input : header,
|
||||
output : '@PLAINNAME@.gen.hh',
|
||||
)
|
||||
endforeach
|
||||
|
||||
sources += files(
|
||||
'context.cc',
|
||||
'fetchClosure.cc',
|
||||
'fetchMercurial.cc',
|
||||
'fetchTree.cc',
|
||||
'fromTOML.cc',
|
||||
)
|
|
@ -17,16 +17,11 @@ cxx = meson.get_compiler('cpp')
|
|||
subdir('build-utils-meson/deps-lists')
|
||||
|
||||
deps_private_maybe_subproject = [
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
dependency('nix-util'),
|
||||
dependency('nix-util-c'),
|
||||
dependency('nix-util-test-support'),
|
||||
dependency('nix-store'),
|
||||
dependency('nix-store-c'),
|
||||
dependency('nix-store-test-support'),
|
||||
dependency('nix-fetchers'),
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
]
|
||||
subdir('build-utils-meson/subprojects')
|
||||
|
||||
subdir('build-utils-meson/export-all-symbols')
|
||||
|
@ -43,8 +38,6 @@ add_project_arguments(
|
|||
'-include', 'config-util.hh',
|
||||
'-include', 'config-store.hh',
|
||||
'-include', 'config-store.hh',
|
||||
'-include', 'config-util.h',
|
||||
'-include', 'config-store.h',
|
||||
language : 'cpp',
|
||||
)
|
||||
|
||||
|
|
|
@ -67,9 +67,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -30,7 +30,7 @@ nlohmann_json = dependency('nlohmann_json', version : '>= 3.9')
|
|||
deps_public += nlohmann_json
|
||||
|
||||
libgit2 = dependency('libgit2')
|
||||
deps_public += libgit2
|
||||
deps_private += libgit2
|
||||
|
||||
add_project_arguments(
|
||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||
|
|
|
@ -69,9 +69,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so its not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
|
||||
|
|
|
@ -17,19 +17,11 @@ cxx = meson.get_compiler('cpp')
|
|||
subdir('build-utils-meson/deps-lists')
|
||||
|
||||
deps_private_maybe_subproject = [
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
dependency('nix-util'),
|
||||
dependency('nix-util-c'),
|
||||
dependency('nix-util-test-support'),
|
||||
dependency('nix-store'),
|
||||
dependency('nix-store-c'),
|
||||
dependency('nix-store-test-support'),
|
||||
dependency('nix-expr'),
|
||||
dependency('nix-expr-c'),
|
||||
dependency('nix-expr-test-support'),
|
||||
dependency('nix-flake'),
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
]
|
||||
subdir('build-utils-meson/subprojects')
|
||||
|
||||
subdir('build-utils-meson/export-all-symbols')
|
||||
|
@ -46,9 +38,6 @@ add_project_arguments(
|
|||
'-include', 'config-util.hh',
|
||||
'-include', 'config-store.hh',
|
||||
'-include', 'config-expr.hh',
|
||||
'-include', 'config-util.h',
|
||||
'-include', 'config-store.h',
|
||||
'-include', 'config-expr.h',
|
||||
language : 'cpp',
|
||||
)
|
||||
|
||||
|
|
|
@ -67,9 +67,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -29,9 +29,6 @@ subdir('build-utils-meson/subprojects')
|
|||
nlohmann_json = dependency('nlohmann_json', version : '>= 3.9')
|
||||
deps_public += nlohmann_json
|
||||
|
||||
libgit2 = dependency('libgit2')
|
||||
deps_public += libgit2
|
||||
|
||||
add_project_arguments(
|
||||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||
# It would be nice for our headers to be idempotent instead.
|
||||
|
|
|
@ -69,9 +69,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so its not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
env = lib.optionalAttrs (stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux")) {
|
||||
|
|
|
@ -62,9 +62,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -64,9 +64,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -17,15 +17,12 @@ cxx = meson.get_compiler('cpp')
|
|||
subdir('build-utils-meson/deps-lists')
|
||||
|
||||
deps_private_maybe_subproject = [
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
dependency('nix-util'),
|
||||
dependency('nix-util-c'),
|
||||
dependency('nix-util-test-support'),
|
||||
dependency('nix-store'),
|
||||
dependency('nix-store-c'),
|
||||
dependency('nix-store-test-support'),
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
]
|
||||
subdir('build-utils-meson/subprojects')
|
||||
|
||||
subdir('build-utils-meson/export-all-symbols')
|
||||
|
|
|
@ -69,9 +69,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -87,9 +87,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -60,9 +60,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -62,9 +62,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -17,12 +17,12 @@ cxx = meson.get_compiler('cpp')
|
|||
subdir('build-utils-meson/deps-lists')
|
||||
|
||||
deps_private_maybe_subproject = [
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
dependency('nix-util'),
|
||||
dependency('nix-util-c'),
|
||||
dependency('nix-util-test-support'),
|
||||
]
|
||||
deps_public_maybe_subproject = [
|
||||
]
|
||||
subdir('build-utils-meson/subprojects')
|
||||
|
||||
subdir('build-utils-meson/export-all-symbols')
|
||||
|
|
|
@ -69,9 +69,11 @@ mkDerivation (finalAttrs: {
|
|||
];
|
||||
|
||||
preConfigure =
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix
|
||||
# "Inline" .version so it's not a symlink, and includes the suffix.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
echo ${version} > .version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
|
@ -79,9 +79,11 @@ mkMesonDerivation (finalAttrs: {
|
|||
|
||||
preConfigure =
|
||||
# TODO: change release process to add `pre` in `.version`, remove it before tagging, and restore after.
|
||||
# Do the meson utils, without modification.
|
||||
''
|
||||
chmod u+w ./.version
|
||||
echo ${version} > ../../.version
|
||||
cp -r ${../../build-utils-meson} build-utils-meson
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
|
|
Loading…
Reference in a new issue