Commit graph

302 commits

Author SHA1 Message Date
Robert Hensing
fbf5fab083 feat(nix-bindings-expr): add RecoverableError for non-memoized primop errors
Nix 2.34 memoizes primop errors by default. RecoverableError uses
NIX_ERR_RECOVERABLE so transient errors allow the thunk to be retried.
2026-03-02 23:53:53 +01:00
Robert Hensing
cf0e8fff6a test(nix-bindings-store): accept new Nix error format for invalid system builds
Nix changed "required system or feature not available" to "platform mismatch".
2026-03-02 23:22:08 +01:00
Hercules CI Effects
1e61578f35 dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/c19e263e6e22ec7379d972f19e6a322f943c73fb?narHash=sha256-V0YOJRum50gtKgwavsAfwXc9%2BXAsJCC7386YZx1sWGQ%3D' (2026-01-15)
  → 'github:hercules-ci/hercules-ci-effects/0b152e0f7c5cc265a529cd63374b80e2771b207b?narHash=sha256-HPBNYf7HiKtBVy7/69vKpLYHX6wTcUxndxmybzDlXP8%3D' (2026-02-15)
• Updated input 'hercules-ci-effects/flake-parts':
    'github:hercules-ci/flake-parts/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11)
  → 'github:hercules-ci/flake-parts/57928607ea566b5db3ad13af0e57e921e6b12381?narHash=sha256-AnYjnFWgS49RlqX7LrC4uA%2BsCCDBj0Ry/WOJ5XWAsa0%3D' (2026-02-02)
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/1412caf7bf9e660f2f962917c14b1ea1c3bc695e?narHash=sha256-AIdl6WAn9aymeaH/NvBj0H9qM%2BXuAuYbGMZaP0zcXAQ%3D' (2026-01-13)
  → 'github:NixOS/nixpkgs/a82ccc39b39b621151d6732718e3e250109076fa?narHash=sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb%2BZnAo5RzSxJg%3D' (2026-02-13)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/a1ef738813b15cf8ec759bdff5761b027e3e1d23?narHash=sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W%2Bxc49RL/U%3D' (2026-01-22)
  → 'github:cachix/pre-commit-hooks.nix/6e34e97ed9788b17796ee43ccdbaf871a5c2b476?narHash=sha256-%2BeXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg%3D' (2026-02-25)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/28b19c5844cc6e2257801d43f2772a4b4c050a1b?narHash=sha256-8aAYwyVzSSwIhP2glDhw/G0i5%2BwOrren3v6WmxkVonM%3D' (2026-01-29)
  → 'github:numtide/treefmt-nix/337a4fe074be1042a35086f15481d763b8ddc0e7?narHash=sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD%2BFyxk%3D' (2026-02-04)
2026-03-01 02:33:12 +00:00
Hercules CI Effects
6ee502a4f9 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11)
  → 'github:hercules-ci/flake-parts/57928607ea566b5db3ad13af0e57e921e6b12381?narHash=sha256-AnYjnFWgS49RlqX7LrC4uA%2BsCCDBj0Ry/WOJ5XWAsa0%3D' (2026-02-02)
• Updated input 'flake-parts/nixpkgs-lib':
    'github:nix-community/nixpkgs.lib/2075416fcb47225d9b68ac469a5c4801a9c4dd85?narHash=sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo%3D' (2025-12-14)
  → 'github:nix-community/nixpkgs.lib/72716169fe93074c333e8d0173151350670b824c?narHash=sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ%2BQDT/KDuyHXVJOpM%3D' (2026-02-01)
• Updated input 'nix':
    'github:NixOS/nix/77b6b01b727f0cd1324e431a32a8854768b957ef?narHash=sha256-vpI7XEfX5zeCVRANUzhMNsZfrMWuN0rwNenQ3z0rJNo%3D' (2026-01-30)
  → 'github:NixOS/nix/0acd0566e85e4597269482824711bcde7b518600?narHash=sha256-jJIlRLPPVYu860MVFx4gsRx3sskmLDSRWXXue5tYncw%3D' (2026-02-27)
• Updated input 'nix-cargo-integration':
    'github:90-008/nix-cargo-integration/6d583e2098fa3df490c2597df06386e3efcc39b6?narHash=sha256-bjtDp0NHjLjDOjklQVHCDCVM5q39zDzuwenNri0p4Ys%3D' (2026-01-31)
  → 'github:90-008/nix-cargo-integration/c783c5dff02c06f2af6226d4dd4d494542d0a4d2?narHash=sha256-NaUqM0i6XIGdgRNxxQ9sfgCAVeE2Ko9rz7e19RsNUKw%3D' (2026-02-28)
• Updated input 'nix-cargo-integration/parts':
    'github:hercules-ci/flake-parts/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11)
  → 'github:hercules-ci/flake-parts/57928607ea566b5db3ad13af0e57e921e6b12381?narHash=sha256-AnYjnFWgS49RlqX7LrC4uA%2BsCCDBj0Ry/WOJ5XWAsa0%3D' (2026-02-02)
• Updated input 'nix-cargo-integration/rust-overlay':
    'github:oxalica/rust-overlay/a1d32c90c8a4ea43e9586b7e5894c179d5747425?narHash=sha256-zmnvRUm15QrlKH0V1BZoiT3U%2BQ%2Btr%2BP5Osi8qgtL9fY%3D' (2026-01-31)
  → 'github:oxalica/rust-overlay/a1ab5e89ab12e1a37c0b264af6386a7472d68a15?narHash=sha256-x6IFQ9bL7YYfW2m2z8D3Em2YtAA3HE8kiCFwai2fwrw%3D' (2026-02-28)
• Updated input 'nix-cargo-integration/treefmt':
    'github:numtide/treefmt-nix/28b19c5844cc6e2257801d43f2772a4b4c050a1b?narHash=sha256-8aAYwyVzSSwIhP2glDhw/G0i5%2BwOrren3v6WmxkVonM%3D' (2026-01-29)
  → 'github:numtide/treefmt-nix/337a4fe074be1042a35086f15481d763b8ddc0e7?narHash=sha256-wQ6NJSuFqAEmIg2VMnLdCnUc0b7vslUohqqGGD%2BFyxk%3D' (2026-02-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/bfc1b8a4574108ceef22f02bafcf6611380c100d?narHash=sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI%3D' (2026-01-26)
  → 'github:NixOS/nixpkgs/dd9b079222d43e1943b6ebd802f04fd959dc8e61?narHash=sha256-I45esRSssFtJ8p/gLHUZ1OUaaTaVLluNkABkk6arQwE%3D' (2026-02-27)
2026-03-01 02:33:10 +00:00
Robert Hensing
d374652a90
Merge pull request #54 from nixops4/add-github-pages
Add GitHub pages
2026-02-10 10:00:39 +01:00
Robert Hensing
ee43f37870 Add documentation links and deployment effect
- Add API documentation links to all Cargo.toml files
- Add API documentation links to all crate READMEs
- Add API Reference link to main README
- Add Hercules CI effect to push docs to gh-pages on main branch
2026-02-10 09:57:10 +01:00
Robert Hensing
a40b4f5190 Add combined rustdoc package with cross-crate linking
NCI's doc-merge doesn't support rustdoc's sharded search index format
(Rust 1.78+), so we build all workspace crates together in a single
cargo doc invocation. This enables cross-crate linking and produces
a custom index page with rustdoc-matching theme support.
2026-02-10 00:46:43 +01:00
hercules-ci[bot]
c5e1444976
Merge pull request #53 from nixops4/flake-update
`flake.lock`: Update
2026-02-01 02:58:44 +00:00
Hercules CI Effects
e9f0f6f7fb dev/flake.lock: Update
Flake lock file updates:

• Updated input 'hercules-ci-effects':
    'github:hercules-ci/hercules-ci-effects/796ba31ee88bcec5c3cbc80ee34c5e157705aab5?narHash=sha256-0bWm54W2kkhrLdvVboT2KVxBliEkc2sNf%2BINaDhvEDU%3D' (2026-01-13)
  → 'github:hercules-ci/hercules-ci-effects/c19e263e6e22ec7379d972f19e6a322f943c73fb?narHash=sha256-V0YOJRum50gtKgwavsAfwXc9%2BXAsJCC7386YZx1sWGQ%3D' (2026-01-15)
• 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/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11)
• Updated input 'hercules-ci-effects/nixpkgs':
    'github:NixOS/nixpkgs/2fbfb1d73d239d2402a8fe03963e37aab15abe8b?narHash=sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0%3D' (2025-12-11)
  → 'github:NixOS/nixpkgs/1412caf7bf9e660f2f962917c14b1ea1c3bc695e?narHash=sha256-AIdl6WAn9aymeaH/NvBj0H9qM%2BXuAuYbGMZaP0zcXAQ%3D' (2026-01-13)
• Updated input 'pre-commit-hooks-nix':
    'github:cachix/pre-commit-hooks.nix/b68b780b69702a090c8bb1b973bab13756cc7a27?narHash=sha256-t3T/xm8zstHRLx%2BpIHxVpQTiySbKqcQbK%2Br%2B01XVKc0%3D' (2025-12-16)
  → 'github:cachix/pre-commit-hooks.nix/a1ef738813b15cf8ec759bdff5761b027e3e1d23?narHash=sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W%2Bxc49RL/U%3D' (2026-01-22)
• Updated input 'pre-commit-hooks-nix/flake-compat':
    'github:edolstra/flake-compat/f387cd2afec9419c8ee37694406ca490c3f34ee5?narHash=sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4%3D' (2025-10-27)
  → 'github:NixOS/flake-compat/5edf11c44bc78a0d334f6334cdaf7d60d732daab?narHash=sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns%3D' (2025-12-29)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/dec15f37015ac2e774c84d0952d57fcdf169b54d?narHash=sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o%3D' (2025-12-30)
  → 'github:numtide/treefmt-nix/28b19c5844cc6e2257801d43f2772a4b4c050a1b?narHash=sha256-8aAYwyVzSSwIhP2glDhw/G0i5%2BwOrren3v6WmxkVonM%3D' (2026-01-29)
2026-02-01 02:33:00 +00:00
Hercules CI Effects
da517ed901 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9?narHash=sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw%3D' (2025-12-15)
  → 'github:hercules-ci/flake-parts/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11)
• Updated input 'nix':
    'github:NixOS/nix/843395a2c87c9b0f0eb9b39bd8567c77cdabcc4e?narHash=sha256-%2BrJcHQE8yjZTR/PZpHr3eya6/Dt1DoGe/9cRoPXTI3k%3D' (2025-12-31)
  → 'github:NixOS/nix/77b6b01b727f0cd1324e431a32a8854768b957ef?narHash=sha256-vpI7XEfX5zeCVRANUzhMNsZfrMWuN0rwNenQ3z0rJNo%3D' (2026-01-30)
• Updated input 'nix/flake-compat':
    'github:edolstra/flake-compat/ff81ac966bb2cae68946d5ed5fc4994f96d0ffec?narHash=sha256-NeCCThCEP3eCl2l/%2B27kNNK7QrwZB1IJCrXfrbv5oqU%3D' (2024-12-04)
  → 'github:NixOS/flake-compat/5edf11c44bc78a0d334f6334cdaf7d60d732daab?narHash=sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns%3D' (2025-12-29)
• Updated input 'nix-cargo-integration':
    'github:90-008/nix-cargo-integration/525ccaf24a3e3b5d28a4dbec8a9c4e1ca759db8e?narHash=sha256-5hrqsS9pnPl1ptnJVtEUkUcbr9feYH8OG14pKRnbG2U%3D' (2025-12-31)
  → 'github:90-008/nix-cargo-integration/6d583e2098fa3df490c2597df06386e3efcc39b6?narHash=sha256-bjtDp0NHjLjDOjklQVHCDCVM5q39zDzuwenNri0p4Ys%3D' (2026-01-31)
• Updated input 'nix-cargo-integration/parts':
    'github:hercules-ci/flake-parts/a34fae9c08a15ad73f295041fec82323541400a9?narHash=sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw%3D' (2025-12-15)
  → 'github:hercules-ci/flake-parts/80daad04eddbbf5a4d883996a73f3f542fa437ac?narHash=sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY%3D' (2026-01-11)
• Updated input 'nix-cargo-integration/rust-overlay':
    'github:oxalica/rust-overlay/6d14586a5917a1ec7f045ac97e6d00c68ea5d9f3?narHash=sha256-TjfAb58Ybz/93e2jP0qD846dj%2BVqiY7wk%2BEqsxcZ708%3D' (2025-12-31)
  → 'github:oxalica/rust-overlay/a1d32c90c8a4ea43e9586b7e5894c179d5747425?narHash=sha256-zmnvRUm15QrlKH0V1BZoiT3U%2BQ%2Btr%2BP5Osi8qgtL9fY%3D' (2026-01-31)
• Updated input 'nix-cargo-integration/treefmt':
    'github:numtide/treefmt-nix/dec15f37015ac2e774c84d0952d57fcdf169b54d?narHash=sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o%3D' (2025-12-30)
  → 'github:numtide/treefmt-nix/28b19c5844cc6e2257801d43f2772a4b4c050a1b?narHash=sha256-8aAYwyVzSSwIhP2glDhw/G0i5%2BwOrren3v6WmxkVonM%3D' (2026-01-29)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c0b0e0fddf73fd517c3471e546c0df87a42d53f4?narHash=sha256-coBu0ONtFzlwwVBzmjacUQwj3G%2BlybcZ1oeNSQkgC0M%3D' (2025-12-28)
  → 'github:NixOS/nixpkgs/bfc1b8a4574108ceef22f02bafcf6611380c100d?narHash=sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI%3D' (2026-01-26)
2026-02-01 02:32:57 +00:00
Robert Hensing
13b71052e6
Merge pull request #51 from DeterminateSystems/upstream-lazy-lock
Replace lazy_static with LazyLock
2026-01-28 08:13:03 +01:00
Tristan Ross
4551c2b378
Replace lazy_static with LazyLock 2026-01-27 12:18:41 -08:00
Robert Hensing
4a3163d18a
Merge pull request #49 from nixops4/chore
chore(devShell): Resolve nixfmt-rfc-style warning
2026-01-26 12:56:12 +01:00
Robert Hensing
1a679ba873 chore(devShell): Resolve nixfmt-rfc-style warning 2026-01-26 12:53:23 +01:00
Robert Hensing
39e6939288
Merge pull request #43 from nixops4/use-harmonia-store-core-new
Add conversions for Harmonia types to nix-bindings-store
2026-01-25 03:29:55 +01:00
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