diff options
author | Benjamin Hipple <bhipple@protonmail.com> | 2020-01-12 11:21:23 -0500 |
---|---|---|
committer | Benjamin Hipple <bhipple@protonmail.com> | 2020-02-10 10:17:29 -0500 |
commit | 2115a2037cb8337ccb09798c175733f1fc747ee3 (patch) | |
tree | ae36678ae1dfb15b8c9cd74229cb369a60ae7fe8 /pkgs/development/tools/documentation | |
parent | d9eb897edd8dfb7c65d8069197e3db5eeb537d69 (diff) | |
download | nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.tar nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.tar.gz nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.tar.bz2 nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.tar.lz nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.tar.xz nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.tar.zst nixlib-2115a2037cb8337ccb09798c175733f1fc747ee3.zip |
fetchcargo: use flat tar.gz file for vendored src instead of recursive hash dir
This has several advantages: 1. It takes up less space on disk in-between builds in the nix store. 2. It uses less space in the binary cache for vendor derivation packages. 3. It uses less network traffic downloading from the binary cache. 4. It plays nicely with hashed mirrors like tarballs.nixos.org, which only substitute --flat hashes on single files (not recursive directory hashes). 5. It's consistent with how simple `fetchurl` src derivations work. 6. It provides a stronger abstraction between input src-package and output package, e.g., it's harder to accidentally depend on the src derivation at runtime by referencing something like `${src}/etc/index.html`. Likewise, in the store it's harder to get confused with something that is just there as a build-time dependency vs. a runtime dependency, since the build-time src dependencies are tarred up. Disadvantages are: 1. It takes slightly longer to untar at the start of a build. As currently implemented, this attaches the compacted vendor.tar.gz feature as a rider on `verifyCargoDeps`, since both of them are relatively newly implemented behavior that change the `cargoSha256`. If this PR is accepted, I will push forward the remaining rust packages with a series of treewide PRs to update the `cargoSha256`s.
Diffstat (limited to 'pkgs/development/tools/documentation')
-rw-r--r-- | pkgs/development/tools/documentation/mdsh/default.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/development/tools/documentation/mdsh/default.nix b/pkgs/development/tools/documentation/mdsh/default.nix index 2ca2ef29dd26..ddce5bc29a43 100644 --- a/pkgs/development/tools/documentation/mdsh/default.nix +++ b/pkgs/development/tools/documentation/mdsh/default.nix @@ -11,8 +11,8 @@ rustPlatform.buildRustPackage rec { sha256 = "1a9i6h8fzrrfzjyfxaps73lxgkz92k0bnmwbjbwdmiwci4qgi9ms"; }; - cargoSha256 = "0rarpzfigyxr6s0ba13z00kvnms29qkjfbfjkay72mb6xn7f1059"; - verifyCargoDeps = true; + cargoSha256 = "1fxajh1n0qvcdas6w7dy3g92wilhfldy90pyk3779mrnh57fa6n5"; + legacyCargoFetcher = false; meta = with stdenv.lib; { description = "Markdown shell pre-processor"; |