Skip to content

Use git to read .cabal files by name - #67

Merged
4e6 merged 1 commit into
typeable:masterfrom
binarin:always-fetch-cabal-files-from-git
Dec 24, 2018
Merged

4e6 merged 1 commit into
typeable:masterfrom
binarin:always-fetch-cabal-files-from-git

Conversation

@binarin

@binarin binarin commented Dec 7, 2018

Copy link
Copy Markdown
Contributor

This allows a bare checkout of all-cabal-hashes, which saves some space and removes a lot of separate files.

But it also means that we'll be able represent a whole all-cabal-hashes repo as a single git .pack-file.

Making that .pack-file reproducible will be a final thing to achieve #41.

This allows a bare checkout `all-cabal-hashes`, which saves some
space and removes a lot of separate files.

But it also means that we'll be able represent a whole
`all-cabal-hashes` repo as a single git .pack-file.

Making that .pack-file reproducible will be a final thing to
achieve typeable#41.
@binarin

binarin commented Dec 7, 2018

Copy link
Copy Markdown
Contributor Author

BTW, bare checkout of all-cabal-hashes shrunk from 1.6G to 382M.

Comment thread nix/lib.nix
installPhase = ''
mkdir -p $out
git clone --branch hackage https://github.com/commercialhaskell/all-cabal-hashes.git $out
git clone --bare --branch hackage https://github.com/commercialhaskell/all-cabal-hashes.git $out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@binarin does --bare imply that the result of git clone is reproducible, and we can actually use fetchgit instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, now --bare just decreases the size of the derivation by removing uncompressed files / duplication.
It's needed because one way to make fetchgit reproducible is to generate a reproducible git {{.pack}}, and then create a full blown git repo from it. But this should be done without using git itself, as we don't know what else it'll decide to create. And bare repo is very easy to create from just a {{.pack}}-file and a commit hash using just a few bash commands.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I see. Nice improvement nevertheless 👍

@4e6 4e6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@4e6
4e6 merged commit 86f11b8 into typeable:master Dec 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants