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

Derivation file not found: Old version <version>" not present in <branch> #346

Open
henrirosten opened this issue Mar 31, 2023 · 1 comment

Comments

@henrirosten
Copy link

henrirosten commented Mar 31, 2023

While manually updating libidn2, I notice nixpkgs-update failed with message:

Old version 2.3.2" not present in master derivation file with contents ...

I believe this occurs due to nix edit libidn2 -f . not finding the derivation file for libidn2. I see this issue is also mentioned in the FAQ.

Eyeing the nixpkgs-update logs, I see at least some other instances of this same issue for other packages too.

Would it be possible to change the nixpkgs-update to fallback to running a find with appropriate search terms when nix edit fails to find the derivation for the target package? Something like:

# In nixpkgs root dir
find ./pkgs -type f -ipath "*/libidn2/default.nix" -print -quit

If that, too, fails to find a derivation with matching old version, then error-out with a proper error message.

@rhendric
Copy link
Member

Why does nix edit fail for libidn2?

I'm under the impression that most of the time when we see this sort of error, it's because the version number is stored in a file that doesn't look like */$pname/default.nix. nix edit, as far as I was aware, will pull up the file in which the meta.description attribute is set. It surprises me that this doesn't happen for this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants