Skip to content

Conversation

tetov
Copy link
Contributor

@tetov tetov commented Jun 13, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@tetov
Copy link
Contributor Author

tetov commented Jun 13, 2025

This builds (locally) without changing the hash, so something is wrong..

@tetov
Copy link
Contributor Author

tetov commented Jun 13, 2025

> nix flake prefetch github:karakeep-app/karakeep/v0.25.0
Downloaded 'github:karakeep-app/karakeep/5b520667e8c0cc9003234611b3f26bb156f1a20a' to '/nix/store/c3j27xi8i9m3nw2b4q5k7x6d7gkcl59z-source' (hash 'sha256-eAiRvesUZIwTaj7CSxtI4rkGlTkgVjbzzwjYaXlhSuo=').

@tetov tetov requested a review from three June 13, 2025 16:29
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jun 13, 2025
@JuliusFreudenberger
Copy link
Contributor

This builds (locally) without changing the hash, so something is wrong..

Then you specify the new version but still fetch the sources for the old version from cache.nixos.org

You can specify an empty string as hash and will get the new hash in an error message during build.

@tetov
Copy link
Contributor Author

tetov commented Jun 13, 2025

Ok, I didn't know that. Building with lib.fakeHash fails as it should. Why would it be a cache hit when the version is wrong?

@JuliusFreudenberger
Copy link
Contributor

I'm also not an expert in this but my understanding is as follows: If something with this hash is present it will be used, no matter if the versions match. So you end up specifying a new version while still building the old one.
That's why something like versionCheckHook helps discover issues like this.

@tetov tetov force-pushed the karakeep_0.25.0 branch from f07fd9c to d434f81 Compare June 13, 2025 17:14
@tetov tetov marked this pull request as ready for review June 13, 2025 17:58
@tetov
Copy link
Contributor Author

tetov commented Jun 13, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416487
Commit: 0088414ab44239e4e8a06884475cf5750e50fae0


x86_64-linux

✅ 1 package built:
  • karakeep

@tetov tetov force-pushed the karakeep_0.25.0 branch from 0088414 to 1d6dab0 Compare June 13, 2025 18:12
@tetov
Copy link
Contributor Author

tetov commented Jun 13, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416487
Commit: 1d6dab032b332b99c03882ea0de099485b7bd39b


x86_64-linux

✅ 1 package built:
  • karakeep

@HritwikSinghal
Copy link
Contributor

HritwikSinghal commented Jun 13, 2025

This builds (locally) without changing the hash, so something is wrong..

see https://discourse.nixos.org/t/why-wouldnt-the-sha256-hash-change-when-fetching-from-a-different-url-when-updating-a-package/11745/3

i encountered the same issue on my local machine when i upgraded my local vuetorrent pkg (i have a local one which use prebuild binary instead of building from source). I would update only the version field (which i see you did in this old commit). It should intuitively download the new binary and complain of hash mismatch, but would build without failing the hash.

i think replacing the hash with lib.fakeHash fixed it and it threw that error, thus i was able to get the correct hash. I don't remember now exactly how i fixed it

Edit: i can see you already fixed it. What was your solution?
Edit 2: nvm, lib.fakeHash was the solution for me.

@JuliusFreudenberger
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 416487

Logs: https://github.com/JuliusFreudenberger/nixpkgs-review-gha/actions/runs/15642759732


x86_64-linux (sandbox = true)

✅ 1 package built:
  • karakeep

aarch64-linux (sandbox = true)

✅ 1 package built:
  • karakeep

@tetov
Copy link
Contributor Author

tetov commented Jun 13, 2025

@HritwikSinghal: I updated the hash based on my nix flake prefetch result and the pnpmDeps just by running it with lib.fakeHash. An empty (or just different) hash would have worked too.

I added update script (after checking that it could deal with pnpmDeps), and a testVersion. But that doesn't help much when the CLI reports the wrong version :(. Filed a bug report upstream.

@pbsbot
Copy link

pbsbot commented Jun 15, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 416487
Commit: 1d6dab032b332b99c03882ea0de099485b7bd39b


x86_64-linux

✅ 1 package built:
  • karakeep

@pbsds pbsds merged commit 16a4af1 into NixOS:master Jun 15, 2025
27 of 28 checks passed
@tetov tetov deleted the karakeep_0.25.0 branch June 16, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants