Commit graph

287 commits

Author SHA1 Message Date
John Ericson
ad412bdd8c CI with and without harmonia 2026-01-24 21:21:06 -05:00
Artemis Tosini
714dcd95c0 Add support for converting between libnix and harmonia derivations 2026-01-24 20:32:05 -05:00
Artemis Tosini
aae065cb3e Add conversions for StorePath to harmonia
Only enabled with new feature "harmonia" due to harmonia's state of
flux.
2026-01-24 20:32:04 -05:00
Robert Hensing
fddf079d35
Merge pull request #48 from nixops4/bump-deps
`cargo update`
2026-01-25 02:02:40 +01:00
John Ericson
57f3fe2ff6 cargo update 2026-01-24 19:54:06 -05:00
Robert Hensing
78262dbe2c
Merge pull request #47 from nixops4/derivation-to-json
`Derivation::to_json_string` and test
2026-01-25 01:47:02 +01:00
John Ericson
43252576c2 Derivation::to_json_string and test
Use `serde_json` at test time.
2026-01-24 19:44:09 -05:00
Robert Hensing
553f6fbfa7
Merge pull request #46 from nixops4/dev-flake-module-delegate-pre-commit-installation-to-upstream
dev: pre-commit.{installationScript -> shellHook}
2026-01-17 16:29:36 +01:00
Robert Hensing
c62dabf959 dev: pre-commit.{installationScript -> shellHook}
Installs the file and pre-commit command on PATH in one go.
2026-01-17 16:27:02 +01:00
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