Commit d2392c7a authored by Jason Yundt's avatar Jason Yundt
Browse files

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.
parent 91870837
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
{
  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 {