ElvishJerricco / nix-purescriptPackages

19 stars 0 forks source link

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

Open wpoosanguansit opened 7 years ago

wpoosanguansit commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Thank you Will. I do have the packages mirroring the ones in bower installed in nix-store at the moment. However, bower still doesn’t recognize the libraries unless I do bower install which brings the libraries in to bower_components folder locally. Is there a way to make bower recognize those in nix-store? Or could you talk more about how you are using code? I might have missed something perhaps. Thanks for your help.

On Jul 13, 2017, at 12:57 AM, Will Fancher notifications@github.com wrote:

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 https://github.com/ElvishJerricco/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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ElvishJerricco/nix-purescriptPackages/issues/4#issuecomment-314970873, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFibVTHrO4zxolb9-5dtNi2rXhc6XSjks5sNaPWgaJpZM4OVChd.

ElvishJerricco commented 7 years ago

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 commented 7 years ago

Thank you for the information. That makes it clearer. I hope incremental build is possible soon.

Best

On Jul 13, 2017, at 8:14 PM, Will Fancher notifications@github.com wrote:

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}: { 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 https://github.com/purescript/purescript/issues/2477 is fixed, I don't think that will be possible.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ElvishJerricco/nix-purescriptPackages/issues/4#issuecomment-315235308, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFibe1BxMRQiDX3FmJorBS6rDIVF_Ysks5sNrLKgaJpZM4OVChd.