Repository navigation
Releases: cachix/nix-derivation
Releases · cachix/nix-derivation
Release list
nix-derivation 0.6.1
Highlights:
- Added
NixHasherfor reusable incremental BLAKE3, MD5, SHA-1, SHA-256, and SHA-512 content hashing. - Added
hash_bytesfor convenient one-shot hashing with the same algorithms. - Digest lengths remain enforced by Rust types and integrate with the crate’s existing Nix hash APIs.
nix-derivation 0.6.0
Highlights:
- Added parsing and serialization for Nix derivation JSON format version 4, including every output form, recursive dynamic inputs, structured attributes, and custom logical stores.
- Matched Nix version negotiation and strict SRI handling for fixed-output hashes.
- Added BLAKE3 hash, content-address, and store-path support.
- Added frozen Nix 2.34.8 fixtures, malformed-input coverage, and live round-trip checks through nix derivation show/add.
nix-derivation 0.5.0
Highlights:
- Added generic SingleDerivedPath and DerivedPath models with typed, store-aware parsing and rendering, dynamic-output chains, legacy separator support, transport strings, and Nix-compatible JSON.
- Added DrvOutput identities with basename and store-aware absolute parsing/rendering plus JSON output.
nix-derivation 0.4.0
Highlights:
- Added typed Nix 2.35 downstream dynamic-output placeholders.
- Added semantic queries for dynamic derivations, required system features, and exportReferencesGraph.
- Added typed dynamic-input resolution across builders, arguments, environment keys and values, and structured attributes.
nix-derivation 0.3.0
Added
- Add
StoreDirand store-aware parsing, rendering, path-construction, builder,
and validated-derivation APIs for non-default logical store directories such
as Guix's/gnu/store. - Add an opt-in Antithesis workload that exercises parsing, serialization,
validation, structured attributes, and store-path round trips with mutated
and arbitrary inputs. - Add Guix fixtures and parity tests covering alternate-store derivation paths,
outputs, inputs, structured attributes, placeholders, and ATerm escaping.
Changed
- Carry the configured store directory through derivation serialization,
hashing, output calculation, and structured-attribute generation while
preserving the existing/nix/storeAPIs as default-store wrappers.
nix-derivation 0.2.0
Breaking changes
- Replace
hash_derivation_moduloandtry_hash_derivation_modulowith
type-directed input-identity and output-path hashing APIs. The new
DerivationModuloHash,InputDerivationHash, andOutputPathHashtypes make
fixed-output and deferred hashes explicit and align the behavior with Nix's
intermediate-derivation model. - Rename
HashDerivationErrortoInputResolutionErrorand allow input hash
resolvers to return typedInputDerivationHashvalues. Raw[u8; 32]values
remain accepted as regular input-addressed hashes. - Strengthen hash and content-address APIs with public
HashAlgorithmand
ContentAddressMethodtypes. This renamesNixHash::from_algo_and_digestto
from_algorithm_and_digestandNixHash::algotoalgorithm, and changes
the correspondingCAHashconstructors and accessors to use typed values. - Change store-path constructors to accept validated
StorePathreferences
instead of path strings, and makebuild_output_pathaccept a
DerivationModuloHash. - Mark public error enums as non-exhaustive and update hash and store-path error
variants to carry the new typed values.
Added
- Add
DerivationBuilder::input_addressed_outputand read-only accessors for
every accumulated builder field. - Add parsing and display implementations for hash algorithms, content-address
methods, Nix hashes, and content addresses. - Add differential tests for derivation-modulo hashing and Nix 2.34 parity,
including fixed-output, content-addressed, and dynamic derivations.
Changed
- Match Nix's derivation-modulo hashing semantics for fixed-output identities,
output-name merging, and unresolved dynamic or content-addressed inputs. - Validate structured attributes without eagerly materializing their JSON value
tree, cache the sorted representation on first use, and generate structured
attribute files without cloning the full object. - Reduce allocations and copies in ATerm serialization, structured-attribute
output substitution, and Nix base32 encoding. - Expand API documentation and update benchmark methodology and results.