Skip to content

cabal2nix tries to fetch hackage revisions even if already present in the source #550

@sternenseemann

Description

@sternenseemann

Consider the servant-cassava.cabal file: It has a Hackage x-revision field checked in the repository which, interestingly, was never applied on Hackage.

cabal2nix, however, recognizes this and sets the revision and even editedCabalFileSha256 (I have no clue yet where this hash comes from). Arguably, when cabal2nixing a revision of a git repo where the modifications of the revision are checked in, it doesn't make sense to fetch the revision from Hackage (it may even fail as in this case). Fixing this will require careful checking if there are any cases where this would be desireable and, most importantly, how this works exactly in all-cabal-hashes, so we don't regress hackage2nix.

Another question is of course if x-revision entries should even be checked in, but seeing as the have been, maybe not that important. Workaround is of course to overrideCabal { revision = null; editedCabalFileSha256 = null; }.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions