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

feat: add an option to cabal2nix hook for specifying output filename. #531

Merged
merged 5 commits into from
Dec 21, 2024

Conversation

rsrohitsingh682
Copy link
Contributor

@rsrohitsingh682 rsrohitsingh682 commented Dec 9, 2024

At present after enabling cabal2nix hook, it generates a file named default.nix which is hardcoded. It is better if user has an option to specify the filename instead of using hardcoded default.nix.

This PR adds an option to cabal2nix hook to specify output filename generated by running cabal2nix.

Example:

cabal2nix = {
   enable = true;
   settings.output_filename = "cabal.nix";
};

@rsrohitsingh682
Copy link
Contributor Author

@sandydoo @NorfairKing Any thoughts on this PR ?

@domenkozar domenkozar requested a review from sandydoo December 13, 2024 18:39
@NorfairKing
Copy link

I don't see a use case so think this needlessly complicating things but I also don't really care 🤷

@rsrohitsingh682
Copy link
Contributor Author

I don't see a use case so think this needlessly complicating things but I also don't really care 🤷

It's required for me as I don't want pre-commit hook to generate a default.nix. Anyways since the default is default.nix so the default behaviour still remains the same.

@rsrohitsingh682
Copy link
Contributor Author

@sandydoo Could you please help with the review ?

Copy link
Member

@sandydoo sandydoo left a comment

Choose a reason for hiding this comment

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

Otherwise, LGTM

modules/hooks.nix Outdated Show resolved Hide resolved
@sandydoo
Copy link
Member

The CI failure is unrelated. This branch needs a rebase on master.

@sandydoo sandydoo merged commit f0f0dc4 into cachix:master Dec 21, 2024
4 checks passed
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.

3 participants