Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support local tarballs #1550

Closed
phadej opened this issue Jul 16, 2022 · 6 comments
Closed

Support local tarballs #1550

phadej opened this issue Jul 16, 2022 · 6 comments

Comments

@phadej
Copy link

phadej commented Jul 16, 2022

i.e.

packages: foo/bar/my-package.tar.gz

I was told this is unsupported, and it's annoying where there is no public git repository nor package is on Hackage, as local unpacked package is never cached etc.

@hamishmack
Copy link
Collaborator

First step would be to check check what is in the plan.json file in for these (we can get that from project.plan-nix.json or dist-newstyle/build/cache/plan.json). Then we would probably need to update plan-to-nix in nix-tools and probably haskell.nix. I think nix is happy if src points to a .tar.gz file so if plan.json has the path and we can get it into the output of plan-to-nix it might just work.

@phadej
Copy link
Author

phadej commented Jul 19, 2022

plan.json does have a path, e.g.

            "id": "hooglite-0.20211229-a6e1a5718903b4e4da4ebbd2a35aeb9bbbfe168ba93c516286773eea6aae09f5",
            "pkg-name": "hooglite",
            "pkg-src": {
                "path": "/code/public-haskell/cabal-extras/extras/hooglite-0.20211229.tar.gz",
                "type": "local-tar"
            },

See also https://hackage.haskell.org/package/cabal-plan-0.7.2.1/docs/Cabal-Plan.html#t:PkgLoc

@codygman
Copy link

Is there any workaround for this? Maybe somehow adding the vendored files to the source?

@phadej
Copy link
Author

phadej commented Aug 16, 2022

@codygman vendored files would be local packages, so not cached/shared by cabal-install. So no, that is not really a workaround.

@L-as
Copy link
Contributor

L-as commented Aug 16, 2022

You can use https://github.com/mlabs-haskell/haskell-nix-extra-hackage as a workaround

@phadej
Copy link
Author

phadej commented Aug 16, 2022

I don't know Nix so I don't know how to use that. I work on a project where others use haskell.nix, and I just want nix develop to work. I'll point it to that workaround, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants