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

How to reference the packages installed in nix-store from bower? #4

Open
wpoosanguansit opened this issue Jul 12, 2017 · 4 comments
Open

Comments

@wpoosanguansit
Copy link

Hi,

Thank you for sharing the code. I have managed to modify you scripts and install 0.11 code into nix-store. However, I am not sure how do we reference the libs installed from bower in the project we have. Is there a way to do that? Thanks for your help.

@ElvishJerricco
Copy link
Owner

This Nix setup doesn't have anything to do with bower. It manages your dependencies using a static package set stored in this repo, and updatable via purescript-packages2nix. You could conceivably generate a purescriptPackages package set from your project's bower configuration though.

PS: I haven't maintained this project at all. It should be relatively easy to update for newer nixpkgs versions and newer psc-package package sets, but I don't really use Purescript enough to justify actively maintaining this myself anymore.

@wpoosanguansit
Copy link
Author

wpoosanguansit commented Jul 13, 2017 via email

@ElvishJerricco
Copy link
Owner

ElvishJerricco commented Jul 14, 2017

This does not interact with bower at all. If you're using a bower.json file, this will not make any use of that. This is meant to be its own build system, relying solely on your own Nix expressions and psc. For example, your project could have the following default.nix:

let purescriptPackages = import /path/to/nix-purescriptPackages {};
in purescriptPackages.callPackage ({mkDerivation, prelude, eff}: mkDerivation {
  pname = "foo";
  version = "0.1.0";
  purescriptDepends = [prelude eff];
  src = ./.;
})

You would build this with nix-build. I have not implemented any way of having bower use the Nix dependencies. I would like to figure out a way to get local incremental development, since this currently can only build via nix-build, which is not incremental and rebuilds the project from scratch. But until purescript/purescript#2477 is fixed, I don't think that will be possible.

@wpoosanguansit
Copy link
Author

wpoosanguansit commented Jul 14, 2017 via email

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

2 participants