resholve: fix using Nix API with overlays

Before this change, if you used an overlay to override the version of
resholve that Nixpkgs uses, then Nixpkgs would sometimes use the new
version of resholve and sometimes use the previous version of resholve.
Specifically, pkgs.resholve would use the new version of resholve and
pkgs.resholve.writeScriptBin would use the previous version of resholve.

This change makes it so that if an overlay replaces pkgs.resholve, then
pkgs.resholve and pkgs.resholve.writeScriptBin will still use the same
version of resholve.

Fixes #418458.
This commit is contained in:
Jason Yundt
2025-07-13 06:53:51 -04:00
parent 91870837c8
commit d2392c7a2b
+3 -2
View File
@@ -1,6 +1,7 @@
{
lib,
pkgsBuildHost,
resholve,
...
}:
@@ -37,10 +38,10 @@ let
callPackage = lib.callPackageWith (pkgsBuildHost // { python27 = python27'; });
source = callPackage ./source.nix { };
deps = callPackage ./deps.nix { };
in
rec {
# not exposed in all-packages
resholveBuildTimeOnly = removeKnownVulnerabilities resholve;
in
rec {
# resholve itself
resholve = (
callPackage ./resholve.nix {