Open domenkozar opened 7 years ago
Interesting, thanks.
If we could support local bower deps, what would the resulting fetchbower
lines look like? What would the hash be?
Would it be acceptable for bower2nix
to ignore such local dependencies? Or should it go and find ../web-bridge/bower.json
and include those dependencies in the output?
The latter would be what fits my use case. How much work is to implement that?
I'll have a crack now. Are there any other interesting deps in your bower.json
?
Thanks! :heart:
Are you able to build and test with nix-build
?
It could work with a tweak to fetchbower/default.nix
to handle paths in version specs. With relative path dependencies it's hard to determine a correct hash to put in the generated file.
You don't need a hash, you can just do ${./web-bridge}
and it will pull that folder into nix store.
I'm currently getting the following after building the project with nix-build
:
error: invalid character ‘/’ in name ‘purescript-avm-bridge-../web-bridge’
(use ‘--show-trace’ to show detailed location information)
So what's left to be implemented is relative path handling in fetchbower?
@rvl should the following work? I can fix the rest, but I think fetch-bower
doesn't work with paths.
$ fetch-bower --out foo web-bride /home/ielectric/dev/web-bridge
$ tree foo
foo
├── packages
└── registry
└── bower.herokuapp.com
├── list
├── lookup
└── search
@rvl ping :)
Sorry for :snail:.
Yes I think fetchBower
function in nixpkgs can be fixed to handle slashes.
Looks like the bower PackageRepository lib isn't fetching paths. I will look into fixing it.
@rvl has there been any progress on this issue? I'm currently in a pickle with bower-based dependencies that are relative to the bower.nix (as opposed to a git repo).
I'm at about the same place @domenkozar was at on Nov 10, 2016; it looks like the endpoint resolution works correctly but the fetch is not happening. Has anyone implemented a work around? When I have some time I'm going to dig into the bower PackageRepository code and see if I can understand why it isn't working.
Hi @ixmatus, no sorry I didn't make any progress on the issue of relative dependencies. A possible solution could be to not use bower. What application are you needing to build with nix?
@rvl that is not an option (right now, at least) because the purescript
community uses bower extensively for package dependencies and the project we're building is a purescript project.
For example if
bower.json
contains:Then building results into:
cc @rvl