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

Expose local package derivations from .project #426

Open
mightybyte opened this issue Nov 28, 2018 · 6 comments
Open

Expose local package derivations from .project #426

mightybyte opened this issue Nov 28, 2018 · 6 comments

Comments

@mightybyte
Copy link
Member

Currently, if I have to depend on a reflex-platform project alpha from another reflex-platform project beta, I've been using callCabal2nix. This is workable, but requires that I duplicate substantial amounts of alpha's nix expression in beta's default.nix file. This kind of situation would be improved if reflex-platform's project infrastructure exposed two things:

  • The individual local package derivations generated by project so I don't have to use callCabal2nix when I depend on them.
  • The full overridden package set that project generates so I can use that as my initial package set and avoid duplicating code specifying the transitive dependencies.

Is this doable?

@Ericson2314
Copy link
Member

CC @ElvishJerricco

@3noch
Copy link
Member

3noch commented Nov 28, 2018

Seems like you could use passthru to pass just about anything through, though I think having a built-in API for this makes sense.

@ElvishJerricco
Copy link
Contributor

I'm planning on moving project over to the NixOS module system at some point, which will make this trivial.

@ElvishJerricco
Copy link
Contributor

For now the easiest thing to do is probably factor out the bits of alpha that need to be shared in dependent projects into a different file that alpha then imports in its default.nix. Then your other project can just import that.

@matthewbauer
Copy link
Member

You should be able to get a package set from a reflex or obelisk project through the reflex attr like reflex.ghc:

nix build -f. reflex.ghc.hello

@ElvishJerricco
Copy link
Contributor

@matthewbauer I think this is more about needing to duplicate a lot of your project's nix expressions. #225 will fix this by letting you define a module that can being merged into other projects easily.

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

No branches or pull requests

7 participants