Skip to content

Update CONTRIBUTING.md with Nix developer shell instructions #9218

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

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

yvan-sraka
Copy link
Collaborator

@yvan-sraka yvan-sraka commented Aug 29, 2023

This PR does not modify the cabal behavior. It only updates the CONTRIBUTING.md documentation with instructions on setting up a Nix developer shell. I believe this could help some newcomers get started more easily to contribute to the project.

Rendered

Checklist:

@andreabedini
Copy link
Collaborator

See #8753

@andreabedini
Copy link
Collaborator

Summarising the discussion in the issue linked above. There is little appetite to have a nix setup in this repository.

This kind of things tend to get bit-rotten [^1] and they are trivial to maintain externally. Indeed all you are proposing here can be obtained with a one-liner:

$ nix-shell -p ghc -p cabal-install -p zlib.dev -p pkgconfig -p haskellPackages.fourmolu -p ghcid

Nevertheless (IIRC) the consensus was that it would ok to add such one liner (as a merge suggestion) to https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md.

[^1] there's bunch of dockerfiles in the repo, does anybody use them?

I appreciate your contribution but I suggest closing this.

@Kleidukos
Copy link
Member

@yvan-sraka Do you think it would be better to have a flake hosted somewhere else? I'm thinking about dependency pinning for instance, because fourmolu needs to be one exact version.

@yvan-sraka
Copy link
Collaborator Author

I've discarded my previous commit and updated the CONTRIBUTING.md. You can view the rendered changes here.

@yvan-sraka
Copy link
Collaborator Author

@yvan-sraka Do you think it would be better to have a flake hosted somewhere else? I'm thinking about dependency pinning for instance, because fourmolu needs to be one exact version.

I don't know, but it would be really easy to just copy this flake or that one in another repo, and then you can use e.g. nix develop github:yvan-sraka/cabal.nix to work with it (which is the approach of ghc.nix).

@Kleidukos
Copy link
Member

@yvan-sraka I think I'd be in favour of pointing to your flake, especially if it means a better, more principled approach.

@yvan-sraka yvan-sraka force-pushed the nix-devshell branch 2 times, most recently from 73c19ad to 1aa4e06 Compare September 1, 2023 10:51
@yvan-sraka
Copy link
Collaborator Author

yvan-sraka commented Sep 1, 2023

@yvan-sraka I think I'd be in favour of pointing to your flake, especially if it means a better, more principled approach.

I've updated the PR (and edited its description to align with the changes) :)

@Kleidukos Kleidukos added merge me Tell Mergify Bot to merge and removed status: consider closing labels Sep 1, 2023
@yvan-sraka yvan-sraka changed the title Set-up a basic developer shell with Nix Update CONTRIBUTING.md with Nix developer shell instructions Sep 1, 2023
@mergify mergify bot added the merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days label Sep 3, 2023
@mergify mergify bot merged commit 24a4603 into haskell:master Sep 3, 2023
@yvan-sraka yvan-sraka deleted the nix-devshell branch September 7, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants