Skip to content

Support all of the package locations that Stack (Pantry) does #1188

Open
@funketh

Description

@funketh

I was using haskell.nix via flakes and it doesn't seem to accept commit tags from other branches than head which stack would accept.

I think this is caused by not using allRefs = true:
NixOS/nix#3814

The second inconsistency I encountered was that stack/pantry accepts tags pointing at forks that aren't merged yet (but have a PR).
When using haskell.nix I'm required to always use the URL of the fork.

I would have assumed that haskell.nix accepts the exact same set of package specifications that stack does but I'm guessing these inconsistencies are caused by haskell.nix using the builtin nix tools instead of stack or pantry itself.

Disclaimer: I encountered these issues late at night yesterday and didn't try to reproduce them yet but here are the excerpts in question that didn't work for me:

extra-deps:
# the commit points to branch ghc-9.0.1 and not head
- github: mokus0/th-extras
  commit: 57a97b4df128eb7b360e8ab9c5759392de8d1659
# the commit actually points to a fork and not haskell-numerics/random-fu (but stack accepts this)
- github: haskell-numerics/random-fu
  commit: 2d38294582ba211df6a5a2b7f7a2c5e71038b0e7

I had to change them to this:

extra-deps:
# I had to fork the fork and merge into the head branch in my fork...
- github: funketh/th-extras
  commit: 57a97b4df128eb7b360e8ab9c5759392de8d1659
# I had to use the url of the fork:
- github: funketh/random-fu
  commit: 2d38294582ba211df6a5a2b7f7a2c5e71038b0e7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions