stackage2nix icon indicating copy to clipboard operation
stackage2nix copied to clipboard

Stack dependencies with subdirs are not supported

Open AlexeyRaga opened this issue 7 years ago • 1 comments

I have the following dependencies in my stack.yaml:

- location:
    git: [email protected]:arbor/antiope.git
    commit: ba073b0cd3847f6549960ecdd321259581582146
    subdirs:
      - antiope-core
      - antiope-s3
  extra-dep: true

But stackage2nix doesn't seem to like it:

error: unable to download '[email protected]:arbor/antiope.git': URL using bad/illegal format or missing URL (3)
Initialized empty Git repository in /private/var/folders/3x/l50y6rts50j_9jqyp0fl7lqh0000gn/T/git-checkout-tmp-jsjeU0Lg/antiope-ba073b0/.git/
remote: Counting objects: 148, done.
remote: Compressing objects: 100% (73/73), done.
remote: Total 148 (delta 58), reused 118 (delta 30), pack-reused 0
Receiving objects: 100% (148/148), 17.06 KiB | 5.69 MiB/s, done.
Resolving deltas: 100% (58/58), done.
From github.com:arbor/antiope
 * [new branch]      master     -> origin/master
Switched to a new branch 'fetchgit'
removing `.git'...

git revision is ba073b0cd3847f6549960ecdd321259581582146
path is /nix/store/kws5gdwap71f0j9wmzmvmhkx08qn69zs-antiope-ba073b0
git human-readable version is -- none --
Commit date is 2018-05-28 11:59:58 +1000
hash is 0kgsfv29jjcw3h9c2s57wqnlygkkmav7yplwl6pfj9h7drvy99vw
*** found zero cabal files. Trying hpack...
*** hpack error: "/nix/store/kws5gdwap71f0j9wmzmvmhkx08qn69zs-antiope-ba073b0/package.yaml: Yaml file not found: /nix/store/kws5gdwap71f0j9wmzmvmhkx08qn69zs-antiope-ba073b0/package.yaml". Exiting.

The repository is public (https://github.com/arbor/antiope), and I don't understand why it initially says

error: unable to download '[email protected]:arbor/antiope.git': URL using bad/illegal format or missing URL (3)

It seems that it can download the repo successfully anyway, but then it doesn't recognise that the actual packages are sitting in subfolders. Both Stack and Nix allow subfolders, so perhaps something can be done on stackage2nix side to support them too.

AlexeyRaga avatar Jun 03 '18 06:06 AlexeyRaga

stackage2nix should support subdirs. Can it be a problem with indentation?

https://github.com/typeable/stackage2nix/blob/c40a8f0c3a8982d7dc74a84d065fd7b60f63e762/test/Stack/Config/YamlSpec.hs#L31-L36

4e6 avatar Jun 08 '18 16:06 4e6