rvl / bower2nix

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

3.2.0 generates wrong hashes #15

Open peterhoeg opened 6 years ago

peterhoeg commented 6 years ago

Coming back to our friend uchiwa, there are still issues. When running bower2nix, I get hash mismatches when trying to build the package:

output path ‘/nix/store/yyvvlc769izfa0ssdal2g4n0aksmcvdc-uchiwa-web-0.26.1’ has 
r:sha256 hash ‘1n4a7inanshh5bxz1c5lwddqyky4innzifzyxvvyjygawg93vi8m’ when 
              ‘13zglwrlba538iqlxmyhfcq51y8xd6d7clnixxqk0zg53ns36cp6’ was expected

The easiest way to try it out is to:

  1. Run bower2nix 3.2.0
  2. Check out nixpkgs
  3. Run pkgs/servers/monitoring/uchiwa/update.sh
  4. Run nix-build -A uchiwa $(pwd)
peterhoeg commented 6 years ago

@rvl anything I can do to help with this?

rvl commented 6 years ago

Hi @peterhoeg, sorry for the late response -- those commands actually work for me. There must be some impurity somewhere -- possibly git -- I will investigate now.

rvl commented 6 years ago

I think maybe bower is not liking the use of a temp directory. I did some tweaks to the update script and it worked: https://github.com/rvl/nixpkgs/commit/dca17b0281e91f66f0ad8803d600f51f0292eb59

peterhoeg commented 6 years ago

Strange, it still doesn't work for me. And if I manually adjust the hashes, I now get this:

bower angular#~1.6.3         ENOTFOUND Package angular not found
peterhoeg commented 6 years ago

Any ideas @rvl ?

rvl commented 6 years ago

I'm not sure ... are you able to build pkgs.uchiwa and/or successfully run ./update.sh from this branch? https://github.com/rvl/nixpkgs/commits/uchiwa

peterhoeg commented 6 years ago

Still:

output path ‘/nix/store/2w1zr6smlbgiphmpj0ar10bmzxm3755s-ua-parser-js-0.7.17’ has r:sha256 hash ‘1g6zajpi7h48x0fp6ibqf2lghvjpyvrmma7r1da7443z6fhmwipv’ when ‘1dx46rm9han9fj409rjxrlnrk9zxmaqbnn62ljnh32ihngd4yxh0
’ was expected
cannot build derivation ‘/nix/store/hx35rpa7cnbgb9f8dm2ixhpyhqmli3rz-bower-env.drv’: 1 dependencies couldn't be built
rvl commented 6 years ago

I got the same (wrong) hash as you on nixos-17.09. Investigating further...

rvl commented 6 years ago

Hi @peterhoeg I have added some tests to travis with channels 17.09 and unstable. It appears that this doesn't work on 17.09 but does work on unstable. If you run the update script with the nixos-unstable branch, does it work for you?

peterhoeg commented 6 years ago

I can build it on unstable as well, but not on 17.09.

peterhoeg commented 6 years ago

Should we close this as 3.2.0 is fine on unstable?