Skip to content

Cannot generate the stack2nix.nix file (failure on packages from git repo) #104

@nlewo

Description

@nlewo

I try to generate the stack2nix.nix file of the stack2nix repository by using the stack2nix master built with Nix. But it fails on packages that come from git repositories. See the following log:

$ git rev-parse HEAD
9070f9173ae32f0be6f7830c41c8cfb8e780fdbf

$ /nix/store/d24r9j57sjinz98zjr595ian61n9p3qh-stack2nix-0.1.3.1/bin/stack2nix .
Ensuring git version is >= 2 ...
Ensuring cabal version is >= 2 ...

+ cabal2nix --subpath . --system x86_64-linux cabal://AC-Vector-2.3.2
+ cabal2nix --subpath . --system x86_64-linux cabal://ALUT-2.4.0.2
+ cabal2nix --subpath . --system x86_64-linux cabal://Agda-2.5.3
...
...
+ cabal2nix --revision e72fbdfe57941627633006fa1fb4003e26619424 --subpath . --system x86_64-linux https://github.com/NixOS/cabal2nix
...
...
+ cabal2nix --revision 0b58f1062d0a87b06bbae343d3c5a2f86ba26537 --subpath . --system x86_64-linux https://github.com/domenkozar/hackage-db
...
...
*** parsing cabal file: https://github.com/NixOS/cabal2nix/.: openFile: does not exist (No such file or directory)
error: hash ‘e72fbdfe57941627633006fa1fb4003e26619424’ has wrong length for hash type ‘sha256’
abort: HTTP Error 406: Not Acceptable
svn: E205000: Syntax error in revision argument 'e72fbdfe57941627633006fa1fb4003e26619424'
*** parsing cabal file: https://github.com/domenkozar/hackage-db/.: openFile: does not exist (No such file or directory)
error: hash ‘0b58f1062d0a87b06bbae343d3c5a2f86ba26537’ has wrong length for hash type ‘sha256’
abort: HTTP Error 406: Not Acceptable
svn: E205000: Syntax error in revision argument '0b58f1062d0a87b06bbae343d3c5a2f86ba26537'
+ cabal2nix --subpath . --system x86_64-linux ./.
bzr: ERROR: Not a branch: "https://github.com/NixOS/cabal2nix/".
stack2nix: user error (Failed to fetch source. Does the URL exist?)
bzr: ERROR: Not a branch: "https://github.com/domenkozar/hackage-db/".

So, I wonder how you have generated the stack2nix.nix file!

The git and cabal versions of my system:

$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library 

$ git --version
git version 2.16.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions