Skip to content

Stack dependencies with subdirs are not supported #60

Description

@AlexeyRaga

I have the following dependencies in my stack.yaml:

- location:
    git: git@github.com: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 'git@github.com: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 'git@github.com: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.

Activity

  1. 4e6 commented on Jun 8, 2018

    @4e6
    Contributor

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

    - location:
    git: git@github.com:example/mega-repo
    commit: 6a86ee32e5b869a877151f74064572225e1a0000
    subdirs:
    - subdir1
    - subdir2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions