NixOS / cabal2nix

Generate Nix build instructions from a Cabal file
https://haskell4nix.readthedocs.io
Other
360 stars 156 forks source link

cabal2nix and bitbucket? #250

Open themoritz opened 8 years ago

themoritz commented 8 years ago

I'm not sure if cabal2nix is supposed to work with bitbucket/mercurial. I'm getting the following output:

$ cabal2nix --compiler=ghcjs https://bitbucket.org/rubenmoor/react-flux-servant
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 56090  100 56090    0     0  83977      0 --:--:-- --:--:-- --:--:-- 88470
source archive /tmp/tmp.CqgPy386tx/react-flux-servant has unknown type
downloading ‘https://bitbucket.org/rubenmoor/react-flux-servant’... [0/0 KiB, 0.0 KiB/s]
*** parsing cabal file: https://bitbucket.org/rubenmoor/react-flux-servant: openBinaryFile: does not exist (No such file or directory)
Initialized empty Git repository in /tmp/git-checkout-tmp-biVY2eqN/react-flux-servant/.git/
remote: Not Found
fatal: repository 'https://bitbucket.org/rubenmoor/react-flux-servant/' not found
remote: Not Found
fatal: repository 'https://bitbucket.org/rubenmoor/react-flux-servant/' not found
remote: Not Found
fatal: repository 'https://bitbucket.org/rubenmoor/react-flux-servant/' not found
Unable to checkout HEAD from https://bitbucket.org/rubenmoor/react-flux-servant.
hg revision is 5bdfec97337a
hash is 0crv66lhiwby8vncp9pkh6gdw9pnda8qfz4dmpsvjgrxnkiaxw50
path is /nix/store/9sk1bcc9dj5a44d52dclqx947fnc2x2j-hg-archive
*** parsing cabal file: https://bitbucket.org/rubenmoor/react-flux-servant: openBinaryFile: does not exist (No such file or directory)
svn: E170013: Unable to connect to a repository at URL 'https://bitbucket.org/rubenmoor/react-flux-servant'
svn: E130005: XML Parsing failed: Unexpected root element 'html'
failed to open trace file: [Errno 2] No such file or directory: ':/.bzr.log'
Not checking SSL certificate for bitbucket.org.
bzr: ERROR: Not a branch: "https://bitbucket.org/rubenmoor/react-flux-servant/".
*** failed to fetch source. Does the URL exist?
peti commented 7 years ago

No, there is no support implemented for these VC systems.

bennofs commented 7 years ago

Actually, this used to work, but was broken in 99e470e62f61913f1fe013b7ba7a71990d8c6672, because only nix-prefetch-git supports json output. Perhaps we should adapt the remaining nix-prefetch-scripts in nixpkgs to support json output as well?