José Luis Lafuente
dfdb90dc8e
C API: Consolidate initializers
2024-03-28 10:52:00 +01:00
José Luis Lafuente
415583a500
C API: use bool argument consistently
2024-03-28 10:52:00 +01:00
José Luis Lafuente
d5ec1d0617
C API: nix_store_open, check for empty strings
2024-03-28 10:51:59 +01:00
José Luis Lafuente
535694122e
C API: rename State to EvalState
2024-03-28 10:51:59 +01:00
José Luis Lafuente
24604d024a
C API: fix docs build after rebase
2024-03-28 10:51:59 +01:00
José Luis Lafuente
41f1669dea
C API: add tests for libutil and libstore
2024-03-28 10:50:02 +01:00
José Luis Lafuente
46f5d0ee7b
Apply suggestions from code review
2024-03-28 10:47:56 +01:00
José Luis Lafuente
550af113c6
String value refactor
...
Related to https://github.com/NixOS/nix/pull/9047
2024-03-28 10:47:56 +01:00
Yorick van Pelt
c6e28d8da2
C API: fix: macos doesn't have std::bind_front
2024-03-28 10:47:56 +01:00
Yorick van Pelt
ab9250286a
C API: add a way to throw errors from primops
2024-03-28 10:47:56 +01:00
Yorick van Pelt
3d79f38709
C API: add user_data argument to nix_alloc_primop
...
Also add a helper function for primops, that converts to C argument
types
(and eventually handles errors)
2024-03-28 10:47:55 +01:00
Yorick van Pelt
48aa57549d
primops: change to std::function, allowing the passing of user data
2024-03-28 10:47:55 +01:00
Yorick van Pelt
9e423dee11
C API: update after rebase
2024-03-28 10:47:55 +01:00
Yorick van Pelt
e1bb799da9
C API: reformat according to proposed clang-format file
2024-03-28 10:47:55 +01:00
Yorick van Pelt
9d380c0f76
C API: clarify some documentation
2024-03-28 10:47:55 +01:00
Yorick van Pelt
5d82d6e733
nix_api: fix missing includes in headers
...
Forward declaration doesn't work here, since we define classes that
contain the objects
2024-03-28 10:47:55 +01:00
Yorick
40f5d48d3c
Apply documentation suggestions from code review
...
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2024-03-28 10:47:55 +01:00
Yorick van Pelt
e642bbc2a7
C API: move to src/lib*/c/
2024-03-28 10:46:39 +01:00
Yorick van Pelt
df9401eb4e
nix_api_store: add nix_init_plugins
2024-03-28 10:39:07 +01:00
Yorick van Pelt
dc0f7d8f96
initPlugins: run nix_plugin_entry() on dlopen'd plugins
...
Only when it exists.
2024-03-28 10:39:07 +01:00
Yorick van Pelt
713f10aeaa
nix_api_value: Add nix_register_primop to add builtins
2024-03-28 10:39:07 +01:00
Yorick van Pelt
e891aac2e4
nix_api_value: add nix_get_attr_name_byidx get attr names without forcing
2024-03-28 10:39:07 +01:00
Yorick van Pelt
9cccb8bae0
nix_api_expr: always force values before giving them to the user
2024-03-28 10:39:07 +01:00
Yorick van Pelt
f0afe7f9b9
nix_api_util: throw nix::error instead of new nix::Error for null ctx's
2024-03-28 10:39:06 +01:00
Yorick van Pelt
e74d6c1b3d
nix_api_expr: document nix_value_force
2024-03-28 10:39:06 +01:00
Yorick van Pelt
e58a9384c6
nix_api_expr, nix_api_util: slightly improve documentation
2024-03-28 10:39:06 +01:00
Yorick van Pelt
f41a7e326b
nix_err_code: do not fail
2024-03-28 10:39:06 +01:00
Yorick van Pelt
b0741f7128
external-api-doc: introduce and improve documentation
2024-03-28 10:39:06 +01:00
Yorick van Pelt
866558af34
nix_api_expr: add error handling to incref, decref
2024-03-28 10:39:06 +01:00
Yorick van Pelt
ada2af4f88
nix_api_expr: add nix_gc_now()
2024-03-28 10:39:06 +01:00
Yorick van Pelt
ded0ef6f6c
nix_api_expr: switch to refcounting
...
Remove GCRef, keep references in a map. Change to nix_gc_incref and
nix_gc_decref, where users will mostly use nix_gc_decref.
2024-03-28 10:39:05 +01:00
Yorick van Pelt
bebee700ea
nix_api_external: own return strings on the nix side
...
Change from nix_returned_string that passes ownership, into a
nix_string_return parameter that can be set using nix_set_string_return.
2024-03-28 10:39:05 +01:00
Yorick van Pelt
022b918db1
nix_api_expr: remove bindingsbuilder refcounting
2024-03-28 10:39:05 +01:00
Yorick van Pelt
aa85f7d917
nix_api_expr: merge nix_parse_expr and nix_expr_eval, remove Expr
2024-03-28 10:39:05 +01:00
Yorick van Pelt
1777e4a5bb
nix_api_store: add userdata param to nix_store_build
2024-03-28 10:39:05 +01:00
Yorick van Pelt
1e583c4ebd
nix_api_value: nix_{get,set}_double -> nix_{get,set}_float
2024-03-28 10:39:05 +01:00
Yorick van Pelt
efcddcdd2f
nix_api_external: fix missing void* self param
2024-03-28 10:39:05 +01:00
Yorick van Pelt
c3b5b8eb62
nix_api_expr, store: fix minor documentation issues
2024-03-28 10:39:05 +01:00
Yorick van Pelt
4a4936136b
nix_api_value: fix documentation for get_attr_byname
2024-03-28 10:39:04 +01:00
Puck Meerburg
748b322ddd
nix_api_value: fix primop arity
2024-03-28 10:39:04 +01:00
Yorick van Pelt
e76652a5d3
libexpr: add C bindings
2024-03-28 10:39:04 +01:00
Yorick van Pelt
1d41600498
libstore: add C bindings
2024-03-28 10:39:04 +01:00
Yorick van Pelt
4702317506
libutil: add C bindings
2024-03-28 10:39:04 +01:00
John Ericson
77205b2042
Allow for ergnomically putting Unix-only files in subdirs by creating INLCUDE_$(pkg)
vars
...
Separate platform-specific files will allow avoiding a lot of CPP.
2024-03-27 12:01:59 -04:00
Théophane Hufschmitt
6c10cc0eda
Merge pull request #10312 from hercules-ci/add-build-dir
...
Add build-dir setting
2024-03-26 13:51:50 +01:00
Théophane Hufschmitt
0bf01917ef
Merge pull request #10325 from K900/ooformatting
...
build-remote: fix format string shenanigans
2024-03-26 11:45:32 +01:00
Théophane Hufschmitt
1394d4e9c5
Merge pull request #10306 from hercules-ci/baseNameOf
...
Test and document `builtins.baseNameOf`, improve internal `baseNameOf()`
2024-03-26 09:59:27 +01:00
K900
2d4edb945b
build-remote: fix format string shenanigans
...
HintFmt(string) invokes the HintFmt("%s", literal) constructor,
which is not what we want here. Add a constructor with a proper name
and call that.
Next step: rename all the other ones to HintFmt::literal(string).
Fixes https://github.com/NixOS/nix/issues/10238
2024-03-26 11:01:03 +03:00
Robert Hensing
8b16cced18
Add build-dir setting
2024-03-25 19:48:59 +01:00
Robert Hensing
b1fe388d33
Remove uncalled for message
2024-03-25 19:48:57 +01:00