Skip to content

Provide hackage and stackage from haskell.nix #47

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 9 commits into from
Feb 13, 2019
Merged

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Feb 8, 2019

  • Provide hackage and stackage from haskell.nix

    Providing hackage and stackage here simplifies usage of the new Haskell Infrastructure.

    With this change, the user doesn't need to specify revisions of the external repos, or update them.

    Basically, with hackage.nix and stackage.nix, the latest version is always best, because snapshots and package versions are added on top. So there is no need for users to choose a revision.

  • Add the mkStackPkgSet function which is a shortcut for building stack projects.

  • Add a test case for stack projects

  • Add nix-tools

  • Provide a script which updates hackage.nix, pushes the changes, and then updates hackage-src.json. Also provide a script which likewise updates stackage.nix, and a little bit of documentation.

@rvl
Copy link
Contributor Author

rvl commented Feb 8, 2019

Thanks for the reviews @angerman @ElvishJerricco.

Am I right to say that with hackage.nix and stackage.nix, the latest revision is always best, because snapshots and package versions are effectively added on top?

@angerman
Copy link
Collaborator

angerman commented Feb 8, 2019

Thanks for the reviews @angerman @ElvishJerricco.

Am I right to say that with hackage.nix and stackage.nix, the latest revision is always best, because snapshots and package versions are effectively added on top?

Yes. They should both be append only. hackage should only get new packages and revisions for existing packages (which are separate). And stackage should just gain new nightly snapshots and lts versions. I don't think stackage considers snapshots to be mutable. Thus I don't expect them to mutate published snapshots/lts releases.

I am however only certain that the hackage index is append only. For stackage I'm only pretty sure that that is the case. I don't remember any formal statement.

@ElvishJerricco
Copy link
Contributor

Personally, I'd like to see the necessary modifications made to nix-tools before merging this, so that we don't have the code churn in haskell.nix of including the nix-tools expressions and then deleting them once we're able to just import nix-tools.

@angerman
Copy link
Collaborator

angerman commented Feb 9, 2019

I'm ok with a two step approach.

@rvl we don't have the update-stackage.nix though right? any particular reason?

@rvl
Copy link
Contributor Author

rvl commented Feb 11, 2019

I didn't add a script for updating stackage.nix because I didn't know how it was updated. The script is added now.

I made the PR input-output-hk/nix-tools#28 so that we can import nix-tools. After merging this, we will need to make a couple more PRs to fix git revisions.

Once this PR is approved, I plan to squash the rework commits before merging.

@rvl rvl force-pushed the rvl/hackage-stackage branch from 40ebcbb to 4298181 Compare February 11, 2019 23:25
rvl added 2 commits February 12, 2019 12:55
I have a suspicion that the compat stuff is bitrotting because it's
not being used and there are no tests.

Relates to #24
@rvl rvl force-pushed the rvl/hackage-stackage branch from 4298181 to 0eac218 Compare February 12, 2019 03:10
rvl added 7 commits February 13, 2019 14:51
Providing hackage and stackage here simplifies usage of the new
Haskell Infrastructure.

With this change, the user doesn't need to specify revisions of the
external repos, or update them.

Basically, with hackage.nix and stackage.nix, the latest version is
always best, because snapshots and package versions are added on
top. So there is no need for users to choose a revision.

Also add mkStackPkgSet which is a shortcut for building stack
projects.
@rvl rvl force-pushed the rvl/hackage-stackage branch from e0c9a45 to 7ff3d1a Compare February 13, 2019 04:52
@rvl rvl merged commit 7446d04 into master Feb 13, 2019
@rvl rvl deleted the rvl/hackage-stackage branch February 13, 2019 04:52
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
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