Commit graph

278 commits

Author SHA1 Message Date
Robert Hensing
7746484926
Merge pull request #45 from nixops4/doc-shared-value-state
doc: Shared Value state
2026-01-15 18:56:08 +01:00
Robert Hensing
c43a67478d doc: Shared Value state 2026-01-15 18:52:58 +01:00
Robert Hensing
42f668b812
Merge pull request #42 from nixops4/store-path-binding
Add `StorePath::from_parts(hash, name)`
2026-01-14 21:51:24 +01:00
Robert Hensing
6619b881b3 Assert STORE_PATH_HASH_SIZE matches C struct
`zerocopy` is safe enough, but it's good to be explicit about this.
2026-01-14 21:47:57 +01:00
John Ericson
65abededca Add new StorePath bindings 2026-01-14 15:43:13 -05:00
John Ericson
0eb73977ef Add zerocopy instance to raw bindings struct
This will come in handy later, when we integrate harmonia. It is a very
stable thing to do.
2026-01-14 15:37:40 -05:00
Robert Hensing
538f29a390
Merge pull request #41 from nixops4/fix-doc
Fix `cargo doc`
2026-01-14 21:31:23 +01:00
John Ericson
ab64f87160 Fix cargo doc 2026-01-14 15:19:47 -05:00
Robert Hensing
a4ebec56de
Merge pull request #40 from nixops4/release
Release, add CHANGELOG and crate READMEs
2026-01-13 18:56:02 +01:00
Robert Hensing
b8c741dfe9 Document release process in full
Adopted the complete workflow from the HCI Effects cargo publish
documentation rather than referencing it, making the steps explicit
and self-contained.
2026-01-13 18:50:29 +01:00
Robert Hensing
9f2c7a2013 Bump version to 0.2.1 for development 2026-01-13 18:50:29 +01:00
Robert Hensing
5aff417cac Document release branch workflow 2026-01-13 17:39:46 +01:00
Robert Hensing
9b2959d57d Add missing description fields to -sys crates 2026-01-13 17:10:54 +01:00
Robert Hensing
db5637a448 Add Unreleased section to CHANGELOG 2026-01-13 17:07:20 +01:00
Robert Hensing
0b0bd7013e nix-bindings-expr: Add version to build-dep for crates.io
cargo publish requires all dependencies to have version requirements.
The build-dependency on nix-bindings-util was missing one.
2026-01-13 16:53:56 +01:00
Robert Hensing
0266e22379 Add CHANGELOG and crate READMEs
- Add CHANGELOG.md documenting 0.1.0 and 0.2.0 releases with contributor
  credits and PR links
- Add README.md to each crate linking to the changelog
- Link READMEs in Cargo.toml files
- Add repository field to -sys crates that were missing it
- Update top-level README to reference changelog and reflect -sys crate split
- Document changelog update step in release process
2026-01-13 16:49:52 +01:00
Robert Hensing
95a8d49693
Merge pull request #27 from nixops4/split-raw
Split monolithic raw crates into sys crates
2026-01-13 15:46:37 +01:00
Robert Hensing
6110414520 Add automatic C library input propagation workaround
Automatically adds Nix C library build inputs based on which nix-bindings
crates are dependencies, working around missing native input propagation
in nix-cargo-integration.

The workaround inspects the dreamLock to detect:
- If the crate being built is a nix-bindings crate (adds its own inputs)
- Direct dependencies on nix-bindings crates (adds their inputs)

The mapping is recursive via lazyAttrsOf, so depending on nix-bindings-flake
automatically brings in transitive C library dependencies.

Downstream consumers can extend the mapping for their own multi-crate
workspaces where crate A depends on crate B which depends on nix-bindings.
2026-01-13 15:31:50 +01:00
Robert Hensing
a669289887
Merge pull request #36 from nixops4/aanderse/main
Fix path coercion by calling eval_state_builder_load()
2026-01-13 02:03:57 +01:00
Robert Hensing
f1d15ff416 EvalStateBuilder: Allow opting out of ambient settings
The C API provides nix_eval_state_builder_load as a separate function
to allow controlling whether settings are loaded from the environment.
Add load_ambient_settings() method to expose this control, with the
default being to load them (needed in some situations to allow path
coercion to work).
2026-01-13 01:58:11 +01:00
Robert Hensing
eff76e9907 Test eval_state_builder_load() to prevent regression 2026-01-13 01:58:10 +01:00
Robert Hensing
22480afeb5 EvalStateBuilder: Specify Nix version constraint 2026-01-13 01:58:08 +01:00
Robert Hensing
7eb94b72f9 Merge remote-tracking branch 'upstream/main' into aanderse/main 2026-01-13 01:57:24 +01:00
John Ericson
dbb00333b1 Split monolithic raw crates into sys crates
Creating a crate for bwd-gc highlights the fact that it would be nice to
fix 2!

The file blocklist is a lost less unmaintainable then the more
fine-grained one we had before.

Fix #9
2026-01-12 19:48:45 -05:00
Robert Hensing
485070ffa9
Merge pull request #39 from nixops4/release
Release
2026-01-13 01:29:17 +01:00
Robert Hensing
2b3ce74ef3 Bump version to 0.1.1 2026-01-13 01:25:43 +01:00
Robert Hensing
a733bf75c8 Document release process 2026-01-13 01:21:57 +01:00
Robert Hensing
436789bfe1 dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/bf9e4201dc26334bcb15040c7b932e3cc3f55bdc?narHash=sha256-oXCmakeIrpwpkwovkJDG7c1TV88qh0MHGiEJCX81/Gs%3D' (2026-01-12)
  → 'github:hercules-ci/hercules-ci-effects/796ba31ee88bcec5c3cbc80ee34c5e157705aab5?narHash=sha256-0bWm54W2kkhrLdvVboT2KVxBliEkc2sNf%2BINaDhvEDU%3D' (2026-01-13)
• Updated input 'hercules-ci-effects/flake-parts':
    'github:hercules-ci/flake-parts/52a2caecc898d0b46b2b905f058ccc5081f842da?narHash=sha256-8oNVE8TrD19ulHinjaqONf9QWCKK%2Bw4url56cdStMpM%3D' (2025-11-12)
  → 'github:hercules-ci/flake-parts/5635c32d666a59ec9a55cab87e898889869f7b71?narHash=sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM%3D' (2025-12-11)
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/c5ae371f1a6a7fd27823bc500d9390b38c05fa55?narHash=sha256-4PqRErxfe%2B2toFJFgcRKZ0UI9NSIOJa%2B7RXVtBhy4KE%3D' (2025-11-12)
  → 'github:NixOS/nixpkgs/2fbfb1d73d239d2402a8fe03963e37aab15abe8b?narHash=sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0%3D' (2025-12-11)
2026-01-13 01:21:32 +01:00
Robert Hensing
956e729e90 dev/flake.nix: Switch to merged hercules-ci-effects 2026-01-13 01:21:28 +01:00
Robert Hensing
780e0af09c dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/edcbb19948b6caf1700434e369fde6ff9e6a3c93?narHash=sha256-UQhfCggNGDc7eam%2BEittlYmeW89CZVT1KkFIHZWBH7k%3D' (2025-12-15)
  → 'github:hercules-ci/hercules-ci-effects/bf9e4201dc26334bcb15040c7b932e3cc3f55bdc?narHash=sha256-oXCmakeIrpwpkwovkJDG7c1TV88qh0MHGiEJCX81/Gs%3D' (2026-01-12)
• Updated input 'hercules-ci-effects/flake-parts':
    'github:hercules-ci/flake-parts/5635c32d666a59ec9a55cab87e898889869f7b71?narHash=sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM%3D' (2025-12-11)
  → 'github:hercules-ci/flake-parts/52a2caecc898d0b46b2b905f058ccc5081f842da?narHash=sha256-8oNVE8TrD19ulHinjaqONf9QWCKK%2Bw4url56cdStMpM%3D' (2025-11-12)
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/2fbfb1d73d239d2402a8fe03963e37aab15abe8b?narHash=sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0%3D' (2025-12-11)
  → 'github:NixOS/nixpkgs/c5ae371f1a6a7fd27823bc500d9390b38c05fa55?narHash=sha256-4PqRErxfe%2B2toFJFgcRKZ0UI9NSIOJa%2B7RXVtBhy4KE%3D' (2025-11-12)
2026-01-12 23:56:14 +01:00
Robert Hensing
c01638c246 dev: Configure cargo-publish 2026-01-12 23:56:07 +01:00
Robert Hensing
c87f6f543b dev/flake.nix: Switch to hci cargo-publish-module branch 2026-01-12 23:43:00 +01:00
Robert Hensing
acd8c5e4f0
Merge pull request #38 from nixops4/util-sys
Rename nix-bindings-bindgen-raw to nix-bindings-util-sys
2026-01-12 20:59:49 +01:00
Robert Hensing
862dcd9eeb Add description and repository metadata to all crates 2026-01-12 20:45:44 +01:00
Robert Hensing
1caf7b85dd Add version requirements to workspace dependencies
cargo publish requires all dependencies to have version specifications.
2026-01-12 20:44:01 +01:00
Robert Hensing
6d941407fe Fix broken rustdoc links 2026-01-12 20:17:40 +01:00
Robert Hensing
e6148b587f Rename nix-bindings-bindgen-raw to nix-bindings-util-sys
Adopt idiomatic Rust `-sys` crate naming convention, aligning with
the direction in PR #37 without adopting the full crate splitting.
2026-01-12 19:56:04 +01:00
Robert Hensing
795dfddc04
Merge pull request #37 from nixops4/warnings
Force no warnings in dev profile
2026-01-10 01:38:37 +01:00
Robert Hensing
5b1988eb42 nci: Deny warnings in dev profile 2026-01-10 01:32:35 +01:00
Robert Hensing
8aad50d4dc clippy: Suppress missing_safety_doc for bindgen output 2026-01-10 01:32:35 +01:00
Aaron Andersen
8f6ec2ec5c Fix path coercion by calling eval_state_builder_load()
Without this call, settings from the global Nix configuration are never
loaded, leaving readOnlyMode = true (the default). This prevents Nix
from adding paths to the store during evaluation, causing errors like:

  error: path '/some/local/path' does not exist

This fix loads global settings before creating the EvalState, enabling
path coercion for local file references.
2026-01-05 20:59:44 -05:00
hercules-ci[bot]
800418e64b
Merge pull request #34 from nixops4/flake-update
`flake.lock`: Update
2026-01-01 02:40:22 +00:00
Hercules CI Effects
1135ff8c75 dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/b0585849abe7d02a774a853f7952d07bb910fd9e?narHash=sha256-jZi%2B9yKmeTMsJ4ZNqRei/wL16%2BQwYGrCl4EJ3QHfoDU%3D' (2025-11-15)
  → 'github:hercules-ci/hercules-ci-effects/edcbb19948b6caf1700434e369fde6ff9e6a3c93?narHash=sha256-UQhfCggNGDc7eam%2BEittlYmeW89CZVT1KkFIHZWBH7k%3D' (2025-12-15)
• Updated input 'hercules-ci-effects/flake-parts':
    'github:hercules-ci/flake-parts/52a2caecc898d0b46b2b905f058ccc5081f842da?narHash=sha256-8oNVE8TrD19ulHinjaqONf9QWCKK%2Bw4url56cdStMpM%3D' (2025-11-12)
  → 'github:hercules-ci/flake-parts/5635c32d666a59ec9a55cab87e898889869f7b71?narHash=sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM%3D' (2025-12-11)
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/c5ae371f1a6a7fd27823bc500d9390b38c05fa55?narHash=sha256-4PqRErxfe%2B2toFJFgcRKZ0UI9NSIOJa%2B7RXVtBhy4KE%3D' (2025-11-12)
  → 'github:NixOS/nixpkgs/2fbfb1d73d239d2402a8fe03963e37aab15abe8b?narHash=sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0%3D' (2025-12-11)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c?narHash=sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ%3D' (2025-12-06)
  → 'github:cachix/pre-commit-hooks.nix/b68b780b69702a090c8bb1b973bab13756cc7a27?narHash=sha256-t3T/xm8zstHRLx%2BpIHxVpQTiySbKqcQbK%2Br%2B01XVKc0%3D' (2025-12-16)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4?narHash=sha256-AlEObg0syDl%2BSpi4LsZIBrjw%2BsnSVU4T8MOeuZJUJjM%3D' (2025-11-12)
  → 'github:numtide/treefmt-nix/dec15f37015ac2e774c84d0952d57fcdf169b54d?narHash=sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o%3D' (2025-12-30)
2026-01-01 02:32:59 +00:00
Hercules CI Effects
eb056b27d9 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/2cccadc7357c0ba201788ae99c4dfa90728ef5e0?narHash=sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q%3D' (2025-11-21)
  → 'github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9?narHash=sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw%3D' (2025-12-15)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/719359f4562934ae99f5443f20aa06c2ffff91fc?narHash=sha256-b0yj6kfvO8ApcSE%2BQmA6mUfu8IYG6/uU28OFn4PaC8M%3D' (2025-10-29)
  → 'github:nix-community/nixpkgs.lib/2075416fcb47225d9b68ac469a5c4801a9c4dd85?narHash=sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo%3D' (2025-12-14)
• Updated input 'nix':
    'github:NixOS/nix/a38fc659cc4f318a45df5b61ec21745ba972f5e6?narHash=sha256-w2sPb/1UH3q5HJambT0CkdUhOxY30MHB2gPI6hStGG8%3D' (2025-12-16)
  → 'github:NixOS/nix/843395a2c87c9b0f0eb9b39bd8567c77cdabcc4e?narHash=sha256-%2BrJcHQE8yjZTR/PZpHr3eya6/Dt1DoGe/9cRoPXTI3k%3D' (2025-12-31)
• Updated input 'nix-cargo-integration':
    'github:90-008/nix-cargo-integration/f5b7a1543357cd2071cc847a9ae378328d7caa57?narHash=sha256-Rngkpanmds2XYIpFav634N2EJnmCVGlT4j04rd/XCLE%3D' (2025-12-13)
  → 'github:90-008/nix-cargo-integration/525ccaf24a3e3b5d28a4dbec8a9c4e1ca759db8e?narHash=sha256-5hrqsS9pnPl1ptnJVtEUkUcbr9feYH8OG14pKRnbG2U%3D' (2025-12-31)
• Updated input 'nix-cargo-integration/dream2nix':
    'github:nix-community/dream2nix/343053a4dfa53ce8abfc35e918cd4ab990abc58d?narHash=sha256-nZjNYEvNKZRF0%2BkoTN2azGWbGlsvLNUTF6PcC0eqTa4%3D' (2025-12-11)
  → 'github:nix-community/dream2nix/69eb01fa0995e1e90add49d8ca5bcba213b0416f?narHash=sha256-5FBZbbWR1Csp3Y2icfRkxMJw/a/5FGg8hCXej2//bbI%3D' (2025-12-17)
• Updated input 'nix-cargo-integration/parts':
    'github:hercules-ci/flake-parts/5635c32d666a59ec9a55cab87e898889869f7b71?narHash=sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM%3D' (2025-12-11)
  → 'github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9?narHash=sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw%3D' (2025-12-15)
• Updated input 'nix-cargo-integration/rust-overlay':
    'github:oxalica/rust-overlay/348b94ed9ddffccdf1a65582a2dcff0a4a3eeeb4?narHash=sha256-qbl874bCIy9%2BOLImdfBfZ9ITUDDjjTAB04Dk4PlZFV0%3D' (2025-12-13)
  → 'github:oxalica/rust-overlay/6d14586a5917a1ec7f045ac97e6d00c68ea5d9f3?narHash=sha256-TjfAb58Ybz/93e2jP0qD846dj%2BVqiY7wk%2BEqsxcZ708%3D' (2025-12-31)
• Updated input 'nix-cargo-integration/treefmt':
    'github:numtide/treefmt-nix/5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4?narHash=sha256-AlEObg0syDl%2BSpi4LsZIBrjw%2BsnSVU4T8MOeuZJUJjM%3D' (2025-11-12)
  → 'github:numtide/treefmt-nix/dec15f37015ac2e774c84d0952d57fcdf169b54d?narHash=sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o%3D' (2025-12-30)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/addf7cf5f383a3101ecfba091b98d0a1263dc9b8?narHash=sha256-hM20uyap1a0M9d344I692r%2Bik4gTMyj60cQWO%2BhAYP8%3D' (2025-12-08)
  → 'github:NixOS/nixpkgs/c0b0e0fddf73fd517c3471e546c0df87a42d53f4?narHash=sha256-coBu0ONtFzlwwVBzmjacUQwj3G%2BlybcZ1oeNSQkgC0M%3D' (2025-12-28)
2026-01-01 02:32:56 +00:00
Robert Hensing
3b9ee17d54
Merge pull request #33 from nixops4/no-clippy-for-dependents
Exclude clippy checks from flake module for dependents
2025-12-28 18:21:53 +01:00
Robert Hensing
424e23f9dc Exclude clippy checks from flake module for dependents
Dependents don't need to run clippy on nix-bindings-rust code; that's
handled by this repo's own CI. The flake module provides build/test
checks for dependents, not linting.

This partially reverts 351a206.
2025-12-28 18:19:58 +01:00
John Ericson
87b82abb82
Merge pull request #29 from nixops4/readme
Update readme
2025-12-15 22:27:10 -05:00
Robert Hensing
edf4d62a08
Merge pull request #32 from nixops4/avoid-workspace-references
Dereference workspace lints for nix-cargo-integration compatibility
2025-12-16 03:13:27 +01:00
Robert Hensing
3a6449d079
Merge pull request #31 from nixops4/newer-nix
Bump Nix
2025-12-16 03:13:07 +01:00
Robert Hensing
b78dd97051 Dereference workspace lints for nix-cargo-integration compatibility
Replace `[lints] workspace = true` with explicit lint configuration in
each crate's Cargo.toml. This allows nix-cargo-integration to build
individual crates in isolation, as it cannot resolve workspace-level
lint configuration when building crates independently.
2025-12-16 03:06:58 +01:00