rvl / bower2nix

Generate nix expressions to fetch bower dependencies.
Other
6 stars 10 forks source link

Fails with packages legitimately containing slashes #13

Closed peterhoeg closed 7 years ago

peterhoeg commented 7 years ago

Later versions of https://github.com/sensu/uchiwa use angular-tools/ng-jsoneditor and while bower2nix will process bower.json, nix will subsequently fail with:

error: invalid character ‘/’ in name ‘angular-tools/ng-jsoneditor-ea138469f157d8f2b54ec5b8dcf4b08a55b61459

bower-packages.json:

(fetchbower "angular-tools/ng-jsoneditor" "ea138469f157d8f2b54ec5b8dcf4b08a55b61459" "ea138469f157d8f2b54ec5b8dcf4b08a55b61459" "1rr7xf3a2l15g2nmd9svq8ijy1v0igc5jdpwp21kna1kzc65jg3m")

Related to #7?

rvl commented 7 years ago

Hi, thanks for the report. I was kind of hoping all the web developers would stop using bower... but

Please try applying this fix to nixpkgs: https://github.com/rvl/nixpkgs/commit/efaec90f603762d10d658e80bbe9870badd51e76

It seems to work for me with uchiwa-web/bower.json.

peterhoeg commented 7 years ago

The mentioned patch partially fixes fetchbower, but when trying to now package the application bower errors out as follows:

bower                                      ENOTFOUND Package angular-tools/ng-jsoneditor=angular-tools/ng-jsoneditor not found
rvl commented 7 years ago

I'm not sure what could be the problem there because uchiwa works for me. See https://gist.github.com/rvl/5012b46b462140fd9d7e4ff940ab0682 . If you download that gist, does it build? The bower.json in there is from current master of uchiwa.

peterhoeg commented 7 years ago

Indeed it does - thanks! Are you planning on merging https://github.com/rvl/nixpkgs/commit/efaec90f603762d10d658e80bbe9870badd51e76 ?

rvl commented 7 years ago

Great, yes I've just added PR NixOS/nixpkgs#27775.

peterhoeg commented 7 years ago

And I just merged it, thanks again!