1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-30 22:20:59 +01:00

Merge pull request #12877 from roberth/c-api-libflake-override-input

C API: Flake loading, input overriding
This commit is contained in:
Robert Hensing 2025-04-08 09:01:51 +02:00 committed by GitHub
commit e76bbe413e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 956 additions and 11 deletions

View file

@ -17,6 +17,7 @@ subdir('nix-meson-build-support/deps-lists')
deps_private_maybe_subproject = [
dependency('nix-store-test-support'),
dependency('nix-fetchers'),
dependency('nix-fetchers-c'),
]
deps_public_maybe_subproject = [
]
@ -39,6 +40,7 @@ subdir('nix-meson-build-support/common')
sources = files(
'access-tokens.cc',
'git-utils.cc',
'nix_api_fetchers.cc',
'public-key.cc',
)

View file

@ -0,0 +1,18 @@
#include "gmock/gmock.h"
#include <gtest/gtest.h>
#include "nix_api_fetchers.h"
#include "nix/store/tests/nix_api_store.hh"
namespace nixC {
TEST_F(nix_api_store_test, nix_api_fetchers_new_free)
{
nix_fetchers_settings * settings = nix_fetchers_settings_new(ctx);
assert_ctx_ok();
ASSERT_NE(nullptr, settings);
nix_fetchers_settings_free(settings);
}
} // namespace nixC

View file

@ -5,6 +5,7 @@
mkMesonExecutable,
nix-fetchers,
nix-fetchers-c,
nix-store-test-support,
libgit2,
@ -40,6 +41,7 @@ mkMesonExecutable (finalAttrs: {
buildInputs = [
nix-fetchers
nix-fetchers-c
nix-store-test-support
rapidcheck
gtest