rvl / bower2nix

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

fetch-bower not resetting `expires` field #11

Closed edofic closed 7 years ago

edofic commented 7 years ago

Building fetchbower for package bootstrap-tour is non-deterministic (and thus build fails).

To reproduce this run

nix-build -E 'let pkgs = import <nixpkgs> {}; in  (pkgs.fetchbower "bootstrap-tour" "0.11.0" "0.11.0" "0sfacwp1awvk93s6a5al1385dixblyizgp8dymnwzkac5mg1x01x")' 

And observe the output. There is a hash mismatch. Now run it again, resulting hash will be yet another value.

I ran nix-build with -K and analysed resulting dirs. Here is the culprit part of the diff

--- a/nix-build-bootstrap-tour-0.11.0.drv-0/out/registry/bower.herokuapp.com/lookup/bootstrap-tour_62fe9
+++ b/nix-build-bootstrap-tour-0.11.0.drv-1/out/registry/bower.herokuapp.com/lookup/bootstrap-tour_62fe9
@@ -1 +1 @@
-{"expires":1484645523867,"value":{"type":"alias","url":"https://github.com/sorich87/bootstrap-tour.git"}}
\ No newline at end of file
+{"expires":1484645546121,"value":{"type":"alias","url":"https://github.com/sorich87/bootstrap-tour.git"}}
\ No newline at end of file
andraz@amaterasu /tmp

Value for expires is different. I found this bit of fetchbower that is supposed to set it to 0 but apparently it doesn't work in this case (it does work for all other packages I have).

This is as far as I got. I can probably invest some more time into fixing this in the near future if need be.

edofic commented 7 years ago

Update: looks like this goes deeper. I posted details to the relevant issue on nixpkgs