Skip to content
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

Replace generate.nix with in-tree generator script #639

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

brendanhay
Copy link
Owner

The current iteration of generate.nix somewhat moronically copies a bunch of unnecessary paths (like, the whole repo) in/out of /nix/store causing it to eat a bunch of disk space.

This PR replaces most of the logic from generate.nix with an equivalent in script/generate, using a nix-shell shebang and GNU parallel to marginally speed up the formatting phase. The audit step which was used to diff what services were un/implemented has been skipped for now.

Copy link
Collaborator

@endgame endgame left a comment

Choose a reason for hiding this comment

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

Seems kinder to people's disks, I agree. Is there a way to work around the lack of audit functionality, or do you have a plan to get that in soon?

Comment on lines +40 to +43
cabal-fmt = {
inherit (pkgs.cabalProject) index-state;
version = "0.1.5.1";
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use pkgs.haskellPackages.cabal-fmt in buildInputs, or is that version too old?

Copy link
Owner Author

Choose a reason for hiding this comment

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

If we use pkgs.haskellPackages.cabal-fmt we need to potentially download another GHC from the cache - by using tools it ensures it uses the same (patched) GHC from haskell.nix.

@brendanhay
Copy link
Owner Author

I'll try and do the audit functionality in a separate pass - probably by exposing the previous diffs (available services in botocore vs services in configs/services) as attributes from default.nix, then just munge those in the bash script.

@brendanhay brendanhay merged commit add39d3 into develop Sep 29, 2021
@brendanhay brendanhay deleted the bh/generator-script branch September 29, 2021 06:06
brendanhay added a commit that referenced this pull request Sep 29, 2021
Adds the rest of the previous generate.nix functionality removed
by #639
brendanhay added a commit that referenced this pull request Sep 29, 2021
Adds the rest of the previous generate.nix functionality removed by #639
brendanhay added a commit that referenced this pull request Sep 29, 2021
Adds the rest of the previous generate.nix functionality removed by #639
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.

None yet

2 participants