New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unextracted all cabal hashes #31333
Unextracted all cabal hashes #31333
Conversation
cc: @shlevy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎆
Barring objections from @peti, ping me in a few days and I'll merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
in fetchFromGitHub (src-spec // | ||
{ postFetch = "${partition-all-cabal-hashes}/bin/partition-all-cabal-hashes $downloadedFile $out"; | ||
}) | ||
fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you prefer fetchurl
over fetchFromGitHub
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchFromGitHub
is the whole cause of the problem. It extracts the tarball in full to a directory, which breaks on macOS when that tarball has paths that clash on a case insensitive file system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I got it! This whole ordeal does make sense now :D
Should we remove that extra hook from fetchurl / fetchgit too? |
@shlevy Any chance we can get this back ported to 17.03? |
Sure, ping me on the PR |
@shlevy Should I just open a PR to the 17.03 branch on nixpkgs-channels? |
No, the release-17.03 branch here. |
Gotcha. |
Motivation for this change
#30290, while useful, is kind of massively complicated, and actually leads to hashes which are different depending on the OS. We can get rid of the crazy C program and special schema, and reduce disk usage if we just leave all the files in the tarball and extract them as needed to their own store paths. This produces unique derivations and therefore unique paths, even given macOS's case insensitivity, without having to conjure those paths manually.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)