Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cre2: 0.3.0 -> 0.3.6 #104127

Merged
merged 1 commit into from Nov 23, 2020
Merged

cre2: 0.3.0 -> 0.3.6 #104127

merged 1 commit into from Nov 23, 2020

Conversation

RaghavSood
Copy link
Member

Motivation for this change

#104048

Upstream seems to have retagged to remove the v from v0.3.0

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@prusnak
Copy link
Member

prusnak commented Nov 20, 2020

Sorry, I just now noticed that the latest is v0.3.6 which uses "v" in the tag again - can you please update the package to latest instead?

@RaghavSood
Copy link
Member Author

RaghavSood commented Nov 20, 2020

You are right, but interestingly the hash didn't change with 0.3.6 - continues to build locally too, but I'll wait for OfBorg as a sanity check

@prusnak
Copy link
Member

prusnak commented Nov 20, 2020

You are right, but interestingly the hash didn't change with 0.3.6

That's because you did not change the hash and nix used the old sources (because they were sources already downloaded matching the hash you specified).

  1. Replace all digits in hash with "0" (you can also use sha256 = stdenv.lib.fakeSha256)
  2. Run the build again to obtain the new hash.

@RaghavSood
Copy link
Member Author

I assumed so too, but doing so didn't help - nix-prefetch-url also returns the same hash

[raghav@t580:~]$ nix-prefetch-url https://github.com/marcomaggi/cre2/archive/v0.3.6.tar.gz --unpack
unpacking...
[0.0 MiB DL]
path is '/nix/store/g8xr4zdzq8n1i4ndp59yi2rdsc0k50p0-v0.3.6.tar.gz'
1h9jwn6z8kjf4agla85b5xf7gfkdwncp0mfd8zwk98jkm8y2qx9q

Using a fake hash also results in the same:

[raghav@ch-misc:~/nixpkgs/nixpkgs]$ nix-build -A cre2
these derivations will be built:
  /nix/store/98yrcpigphm5lb949037yykl2s3q08hi-source.drv
  /nix/store/gz8s44j6xc34bjp2wxhlpskz5c0p659f-cre2-0.3.6.drv
building '/nix/store/98yrcpigphm5lb949037yykl2s3q08hi-source.drv'...

trying https://github.com/marcomaggi/cre2/archive/v0.3.6.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   123  100   123    0     0    523      0 --:--:-- --:--:-- --:--:--   523
100 51119    0 51119    0     0  97741      0 --:--:-- --:--:-- --:--:-- 97741
unpacking source archive /build/v0.3.6.tar.gz
hash mismatch in fixed-output derivation '/nix/store/azixcya4gnmmc8fgp15ggfj7dqwi836c-source':
  wanted: sha256:0000000000000000000000000000000000000000000000000000
  got:    sha256:1h9jwn6z8kjf4agla85b5xf7gfkdwncp0mfd8zwk98jkm8y2qx9q
cannot build derivation '/nix/store/gz8s44j6xc34bjp2wxhlpskz5c0p659f-cre2-0.3.6.drv': 1 dependencies couldn't be built
error: build of '/nix/store/gz8s44j6xc34bjp2wxhlpskz5c0p659f-cre2-0.3.6.drv' failed

@prusnak
Copy link
Member

prusnak commented Nov 20, 2020

It seems there was a mistake in older merge commit (fe9a3e3) which reverted the cre2 version while keeping the hash from the already updated package.

Anyway, the things are fixed now and good to go.

@prusnak prusnak merged commit dc79251 into NixOS:master Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants