I must be missing something very basic, and I can’t figure out what. It seems to be simple: I want to update the software version of the default package of this flake.
{
# shortened version
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
version = "v1.0.3"; # <======================= crucial part
in
with pkgs;
{
packages.${system} = {
default =
stdenv.mkDerivation rec {
src = fetchzip {
url = "https://github.com/HEnquist/camilladsp/releases/download/${version}/camilladsp-linux-amd64.tar.gz";
hash = "sha256-zWOyPmaHRi2VIRvzFpS02tPlXNn90ogU2Q/YRx7l6eI=";
};
# ...
Changing the version from v1.0.3 to v2.0.1 does not change the version, though. nix build .#default does not even complain that the src.hash changed even though the src.url does. (I downloaded by hand and verified that the two TARs do indeed contain a different version.) After build, I run the tool from the result folder with the usual --version flag and it is still 1.0.3.
What is going on here? What do I have to change to make it work? My goal is to use this flake as an input to my system setup flake. (This does work for the 1.0.3 version, and now I want to update the software.)
Seems like the hash mismatch error got buried? Odd to me also that nix hash to-sri --type sha256 $(nix-prefetch-url --unpack https://github.com/HEnquist/camilladsp/releases/download/v2.0.1/camilladsp-linux-amd64.tar.gz) produces the wrong hash?
Hi, and thank you for the quick help. It seems to work–at least building the flake does something now .
Before rushing on to integrating it into my system, I’d like to share this curiosity that surprised me. Maybe it’s interesting/quirky for some, maybe somebody can shed light what’s going on:
As you suggested, I was tampering with the hash at first, trying to make the build complain about the wrong hash. However, I did not replace with the correct hash right away (thank you for providing the command–very valuable to know!), but I changed only one character of it. And that did not trigger the expected behavior. I changed