Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-08-05 | Add Hash::dummy to signal default value | Carlo Nucera | |
We did this in the same spirit of the dummy value that's present in libstore/path.hh | |||
2020-07-20 | Remove period at the end of the exception message | John Ericson | |
2020-07-20 | parser.hh -> split.hh | John Ericson | |
2020-07-16 | Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into ↵ | John Ericson | |
better-ca-parse-errors | |||
2020-07-16 | Merge remote-tracking branch 'upstream/master' into hash-always-has-type | John Ericson | |
2020-07-15 | Merge branch 'master' of github.com:NixOS/nix into hash-always-has-type | Carlo Nucera | |
2020-07-14 | Merge remote-tracking branch 'origin/master' into flakes | Eelco Dolstra | |
2020-07-13 | Remove istringstream_nocopy | Eelco Dolstra | |
2020-07-06 | Merge remote-tracking branch 'origin/master' into flakes | Eelco Dolstra | |
2020-07-03 | Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into ↵ | John Ericson | |
better-ca-parse-errors | |||
2020-07-03 | Merge branch 'master' of github.com:NixOS/nix into hash-always-has-type | John Ericson | |
2020-07-02 | Have `splitPrefix` and `splitPrefixTo` parser helpers | John Ericson | |
2020-07-02 | Move `getParsedTypeAndSRI` to a more suitable location | John Ericson | |
Also mark it static | |||
2020-07-02 | Fix abort in 'nix develop' | Eelco Dolstra | |
2020-07-02 | Write the implementation for parseNonSRIUnprefixed | Carlo Nucera | |
2020-07-02 | Abstract common parsing functionality | Carlo Nucera | |
2020-07-02 | Inline and simplify in parseAnyPrefixed | Carlo Nucera | |
2020-07-02 | Rename fromSRI to parseSRI for constistency | Carlo Nucera | |
2020-07-02 | Get rid of the std::pair | Carlo Nucera | |
2020-07-02 | Inline newFunction | Carlo Nucera | |
2020-07-02 | Fix test suite | Carlo Nucera | |
2020-07-01 | Rename two hash constructors to proper functions | Carlo Nucera | |
2020-07-01 | Inline Hash::init() | Carlo Nucera | |
2020-07-01 | Keep the previous name, for diffing | Carlo Nucera | |
2020-07-01 | Fixed build, we still have test errors | Carlo Nucera | |
2020-06-30 | WIP initial design | Carlo Nucera | |
2020-06-30 | Factor the prefix splitting in hash | Carlo Nucera | |
2020-06-29 | Merge remote-tracking branch 'upstream/master' into hash-always-has-type | John Ericson | |
2020-06-26 | Merge remote-tracking branch 'origin/master' into flakes | Eelco Dolstra | |
2020-06-25 | Fix empty std::optional dereference in writeDerivation() | Eelco Dolstra | |
https://hydra.nixos.org/build/123017579 | |||
2020-06-23 | Fix and clean up hash parser | John Ericson | |
2020-06-23 | Merge remote-tracking branch 'upstream/master' into hash-always-has-type | John Ericson | |
2020-06-19 | WIP: Make Hash always store a valid hash type | John Ericson | |
2020-06-19 | Merge remote-tracking branch 'upstream/master' into ↵ | John Ericson | |
validPathInfo-ca-proper-datatype | |||
2020-06-19 | tabs -> spaces | John Ericson | |
2020-06-19 | Remove some `Base::` that crept in | John Ericson | |
2020-06-18 | Revert the `enum struct` change | John Ericson | |
Not a regular git revert as there have been many merges and things. | |||
2020-06-18 | Merge branch 'enum-class' into no-hash-type-unknown | John Ericson | |
2020-06-18 | Merge remote-tracking branch 'upstream/master' into enum-class | John Ericson | |
2020-06-17 | Merge remote-tracking branch 'origin/master' into flakes | Eelco Dolstra | |
2020-06-12 | Use `std::string_view` in a few more places | John Ericson | |
2020-06-12 | Fix build | Eelco Dolstra | |
2020-06-12 | Provide base argument to to_string | Matthew Bauer | |
2020-06-12 | Add newHashAllowEmpty helper function | Matthew Bauer | |
This replaces the copy&paste with a helper function in hash.hh. | |||
2020-06-02 | Fix hashes | John Ericson | |
2020-06-02 | Remove `HashType::Unknown` | John Ericson | |
Instead, `Hash` uses `std::optional<HashType>`. In the future, we may also make `Hash` itself require a known hash type, encoraging people to use `std::optional<Hash>` instead. | |||
2020-05-10 | nix: Implement basic bash completion | Eelco Dolstra | |
2020-03-29 | Use `enum struct` and drop prefixes | John Ericson | |
This does a few enums; the rest will be gotten in subsequent commits. | |||
2019-10-21 | Allow content-addressable paths to have references | Eelco Dolstra | |
This adds a command 'nix make-content-addressable' that rewrites the specified store paths into content-addressable paths. The advantage of such paths is that 1) they can be imported without signatures; 2) they can enable deduplication in cases where derivation changes do not cause output changes (apart from store path hashes). For example, $ nix make-content-addressable -r nixpkgs.cowsay rewrote '/nix/store/g1g31ah55xdia1jdqabv1imf6mcw0nb1-glibc-2.25-49' to '/nix/store/48jfj7bg78a8n4f2nhg269rgw1936vj4-glibc-2.25-49' ... rewrote '/nix/store/qbi6rzpk0bxjw8lw6azn2mc7ynnn455q-cowsay-3.03+dfsg1-16' to '/nix/store/iq6g2x4q62xp7y7493bibx0qn5w7xz67-cowsay-3.03+dfsg1-16' We can then copy the resulting closure to another store without signatures: $ nix copy --trusted-public-keys '' ---to ~/my-nix /nix/store/iq6g2x4q62xp7y7493bibx0qn5w7xz67-cowsay-3.03+dfsg1-16 In order to support self-references in content-addressable paths, these paths are hashed "modulo" self-references, meaning that self-references are zeroed out during hashing. Somewhat annoyingly, this means that the NAR hash stored in the Nix database is no longer necessarily equal to the output of "nix hash-path"; for content-addressable paths, you need to pass the --modulo flag: $ nix path-info --json /nix/store/iq6g2x4q62xp7y7493bibx0qn5w7xz67-cowsay-3.03+dfsg1-16 | jq -r .[].narHash sha256:0ri611gdilz2c9rsibqhsipbfs9vwcqvs811a52i2bnkhv7w9mgw $ nix hash-path --type sha256 --base32 /nix/store/iq6g2x4q62xp7y7493bibx0qn5w7xz67-cowsay-3.03+dfsg1-16 1ggznh07khq0hz6id09pqws3a8q9pn03ya3c03nwck1kwq8rclzs $ nix hash-path --type sha256 --base32 /nix/store/iq6g2x4q62xp7y7493bibx0qn5w7xz67-cowsay-3.03+dfsg1-16 --modulo iq6g2x4q62xp7y7493bibx0qn5w7xz67 0ri611gdilz2c9rsibqhsipbfs9vwcqvs811a52i2bnkhv7w9mgw | |||
2018-12-13 | Support SRI hashes | Eelco Dolstra | |
SRI hashes (https://www.w3.org/TR/SRI/) combine the hash algorithm and a base-64 hash. This allows more concise and standard hash specifications. For example, instead of import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; sha256 = "5d22dad058d5c800d65a115f919da22938c50dd6ba98c5e3a183172d149840a4"; }; you can write import <nix/fetchurl.nl> { url = https://nixos.org/releases/nix/nix-2.1.3/nix-2.1.3.tar.xz; hash = "sha256-XSLa0FjVyADWWhFfkZ2iKTjFDda6mMXjoYMXLRSYQKQ="; }; In fixed-output derivations, the outputHashAlgo is no longer mandatory if outputHash specifies the hash (either as an SRI or in the old "<type>:<hash>" format). 'nix hash-{file,path}' now print hashes in SRI format by default. I also reverted them to use SHA-256 by default because that's what we're using most of the time in Nixpkgs. Suggested by @zimbatm. |