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
Partition all-cabal-hashes into case-insensitive-safe components. #30290
Conversation
Have an idea for simplifying this and hopefully speeding it up significantly. |
OS X by default has a case-insensitive filesystem, and fetching all-cabal-hashes there fails due to a hash mismatch caused by package pairs like compactable and Compactable. This partitions the package set such that each partition contains no equivalent-up-to-case pairs.
8c9af0a
to
843e099
Compare
OK, recent version is much faster. Faster than a |
Barring any objection I'll merge mid next week @peti |
pkgs/data/misc/hackage/default.nix
Outdated
{ name = "partition-all-cabal-hashes"; | ||
src = ./partition-all-cabal-hashes.c; | ||
unpackPhase = "true"; | ||
buildInputs = [ pkgconfig libarchive glib ]; |
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.
Should be a nativeBuildInputs = [ pkgconfig ];
.
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.
@Ericson2314 I'll make that change, but FWIW this is almost always going to be used at eval time and thus not cross-compiled.
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.
The functionality provided by partition-all-cabal-hashes.c seems more general, i.e. I assume that many other projects have similar problems. Would it be possible to factor that tool out of pkgs/data/misc/hackage
somehow?
Generally speaking, I'll drop all use of the "all-cabal-hashes" repo ASAP since this stuff if broken in several other ways, too, and we can find the hashes in the 01-index.tar.gz tarball from cabal-install anyway these days.
Hmm I don't know of any other projects with similar problems. Anyway this assumes things about the structure of the tarball, it could possibly be generalized but I would like to see another example or two to see how it can be done usefully. What is the structure of the 01-index.tar.gz tarball? |
Just checked that tarball, it will have exactly the same issue and this same tool will work on it. |
Just checked that tarball, it will have exactly the same issue.
No, it won't, because we'll never extract it.
|
Ah, cabal2nix will extract info directly from the tarball? Nice. Can we merge this in the mean time though? |
If it works, then I don't see why not. |
@shlevy Wouldn’t it have been easier to just extract individual files from the tar file as needed? |
@ElvishJerricco Yeah, fair point 😀 |
OS X by default has a case-insensitive filesystem, and fetching
all-cabal-hashes there fails due to a hash mismatch caused by package
pairs like compactable and Compactable. This partitions the package set
such that each partition contains no equivalent-up-to-case pairs.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)