From a90223da3714f7905d7adab1d86968ee14f7e02e Mon Sep 17 00:00:00 2001 From: Archit Gupta Date: Tue, 16 Jan 2024 10:55:57 -0800 Subject: [PATCH] Remove use of different pkgs for calculating name If a package uses `pkgs` and tries to get a non-existing package, there will be an uncachable error. As we cannot control this, this method needs to be removed. Instead of using this method, the mocked pkgs should be extended to support more cases. --- builtinModules/packages.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/builtinModules/packages.nix b/builtinModules/packages.nix index 41a0843..0645dd7 100644 --- a/builtinModules/packages.nix +++ b/builtinModules/packages.nix @@ -59,8 +59,6 @@ in packageOverlay = final: prev: let getName = pkg: pkg.pname or (parseDrvName pkg.name).name; - inherit (prev.stdenv.hostPlatform) system; - baseNixpkgs = inputs.nixpkgs.legacyPackages.${system}; mockPkgs = import ../misc/nameMockedPkgs.nix prev; defaultPkgName = findFirst (x: (tryEval x).success) @@ -69,7 +67,6 @@ in [ (assert config.pname != null; config.pname) (getName (mockPkgs.callPackage config.packages.default { })) - (getName (baseNixpkgs.callPackage config.packages.default { })) (getName (import inputs.nixpkgs { inherit (prev.stdenv.hostPlatform) system; inherit (config.nixpkgs) config;