Relevant: https://github.com/NixOS/nix/issues/969
On Fri, Aug 26, 2016 at 1:18 PM, Damien Cassou <[email protected]> wrote: > > > On August 26, 2016 12:50:48 PM GMT+02:00, Sergey Mironov <[email protected]> > wrote: > > I decided to bump a version. Since there is 20160805 version available, > >I wanted to 1) replace "20151220" with "20160805", 2) run `nix-env -i > >urweb` to see a 'Hash mismatch' error, and finaly 3) copy correct hash > >to she sha256 field. > > > >Surprisingly, `nix-env -i urweb` finished without errors. It reported > >that installation of urweb-20160805 was successful, but in fact it was > >old urweb-20151220 with new name. (urweb --version showed it clearly). > > > This is not a bug but expected behavior. The sha256 field is used to > compute the derivation hash. With this hash, Nix checks if there is already > something in the store. If yes, this is used as the source without > downloading again. > > What I do: when I update a derivation, I update the name and I randomly > change the sha256. nix-build or nix-env then downloads the new release > tarball, compares the sha256s, fails, and tells me the actual sha256. > -- > Damien Cassou > http://damiencassou.seasidehosting.st > > "Success is the ability to go from one failure to another without > losing enthusiasm." --Winston Churchill > _______________________________________________ > nix-dev mailing list > [email protected] > http://lists.science.uu.nl/mailman/listinfo/nix-dev >
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
