1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-20 17:29:36 +01:00

Tagging release 2.28.0

-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCAAxFiEEtUHVUwEnDgvPFcpdgXC0cm1xmN4FAmfv9fITHGVkb2xzdHJh
 QGdtYWlsLmNvbQAKCRCBcLRybXGY3ohrCAC1Uw/JJr3yEPlJ/jLc9t9HqEKMY08W
 W6SEjpYJHYixMXmoonexkqojncNWBaiytRa+vBY7JQq0xTOOBwj42TM2ZzMF4GXi
 vO4Ox0hEsRa/v7tSmK6GFz1sNEKEUOHDNbilg4kzkkBHPEGPUGMwdWkT0akO576Q
 SQ6ERwPPLsHDI2YtAeAD8R4p07CraiyA34ljDPz3rChTAXRPVKWxJUt1enwEWYTr
 cKk45RcR4S8rP1BVwf3wsNsrHjqjbaY45kPAo8GD79hFH0zkyJarS3Kgv8qsWLra
 9ph0DVVG0wiArlET7Y3uchqtAC0Z5LOnutAmOFYFw6DKfWp9yGfl/SVW
 =XRda
 -----END PGP SIGNATURE-----

Merge tag '2.28.0' into sync-2.28.0

Tagging release 2.28.0
This commit is contained in:
Eelco Dolstra 2025-04-04 17:49:15 +02:00
commit 852075ec9d
697 changed files with 4531 additions and 3970 deletions

View file

@ -4,16 +4,16 @@
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include "fetch-settings.hh"
#include "value.hh"
#include "nixexpr.hh"
#include "nixexpr.hh"
#include "eval.hh"
#include "eval-gc.hh"
#include "eval-inline.hh"
#include "eval-settings.hh"
#include "nix/fetchers/fetch-settings.hh"
#include "nix/expr/value.hh"
#include "nix/expr/nixexpr.hh"
#include "nix/expr/nixexpr.hh"
#include "nix/expr/eval.hh"
#include "nix/expr/eval-gc.hh"
#include "nix/expr/eval-inline.hh"
#include "nix/expr/eval-settings.hh"
#include "tests/libstore.hh"
#include "nix/store/tests/libstore.hh"
namespace nix {
class LibExprTest : public LibStoreTest {

View file

@ -0,0 +1,9 @@
# Public headers directory
include_dirs = [include_directories('../../..')]
headers = files(
'libexpr.hh',
'nix_api_expr.hh',
'value/context.hh',
)

View file

@ -2,7 +2,7 @@
///@file
#include "nix_api_expr.h"
#include "nix_api_value.h"
#include "tests/nix_api_store.hh"
#include "nix/store/tests/nix_api_store.hh"
#include <gtest/gtest.h>

View file

@ -3,7 +3,7 @@
#include <rapidcheck/gen/Arbitrary.h>
#include "value/context.hh"
#include "nix/expr/value/context.hh"
namespace rc {
using namespace nix;

View file

@ -29,28 +29,13 @@ subdir('nix-meson-build-support/subprojects')
rapidcheck = dependency('rapidcheck')
deps_public += rapidcheck
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.
'-include', 'config-util.hh',
'-include', 'config-store.hh',
'-include', 'config-expr.hh',
language : 'cpp',
)
subdir('nix-meson-build-support/common')
sources = files(
'tests/value/context.cc',
)
include_dirs = [include_directories('.')]
headers = files(
'tests/libexpr.hh',
'tests/nix_api_expr.hh',
'tests/value/context.hh',
)
subdir('include/nix/expr/tests')
subdir('nix-meson-build-support/export-all-symbols')
subdir('nix-meson-build-support/windows-version')
@ -67,7 +52,7 @@ this_library = library(
install : true,
)
install_headers(headers, subdir : 'nix', preserve_path : true)
install_headers(headers, subdir : 'nix/expr/tests', preserve_path : true)
libraries_private = []

View file

@ -29,6 +29,7 @@ mkMesonLibrary (finalAttrs: {
./.version
./meson.build
# ./meson.options
./include/nix/expr/tests/meson.build
(fileset.fileFilter (file: file.hasExt "cc") ./.)
(fileset.fileFilter (file: file.hasExt "hh") ./.)
];

View file

@ -1,30 +1,39 @@
#include <rapidcheck.h>
#include "tests/path.hh"
#include "tests/value/context.hh"
#include "nix/store/tests/path.hh"
#include "nix/expr/tests/value/context.hh"
namespace rc {
using namespace nix;
Gen<NixStringContextElem::DrvDeep> Arbitrary<NixStringContextElem::DrvDeep>::arbitrary()
{
return gen::just(NixStringContextElem::DrvDeep {
.drvPath = *gen::arbitrary<StorePath>(),
return gen::map(gen::arbitrary<StorePath>(), [](StorePath drvPath) {
return NixStringContextElem::DrvDeep{
.drvPath = drvPath,
};
});
}
Gen<NixStringContextElem> Arbitrary<NixStringContextElem>::arbitrary()
{
switch (*gen::inRange<uint8_t>(0, std::variant_size_v<NixStringContextElem::Raw>)) {
case 0:
return gen::just<NixStringContextElem>(*gen::arbitrary<NixStringContextElem::Opaque>());
case 1:
return gen::just<NixStringContextElem>(*gen::arbitrary<NixStringContextElem::DrvDeep>());
case 2:
return gen::just<NixStringContextElem>(*gen::arbitrary<NixStringContextElem::Built>());
default:
assert(false);
}
return gen::mapcat(
gen::inRange<uint8_t>(0, std::variant_size_v<NixStringContextElem::Raw>),
[](uint8_t n) -> Gen<NixStringContextElem> {
switch (n) {
case 0:
return gen::map(
gen::arbitrary<NixStringContextElem::Opaque>(), [](NixStringContextElem a) { return a; });
case 1:
return gen::map(
gen::arbitrary<NixStringContextElem::DrvDeep>(), [](NixStringContextElem a) { return a; });
case 2:
return gen::map(
gen::arbitrary<NixStringContextElem::Built>(), [](NixStringContextElem a) { return a; });
default:
assert(false);
}
});
}
}