1
1
forked from extern/flakelight

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.
This commit is contained in:
Archit Gupta 2024-01-16 10:55:57 -08:00
parent e143290511
commit a90223da37

View File

@ -59,8 +59,6 @@ in
packageOverlay = final: prev: packageOverlay = final: prev:
let let
getName = pkg: pkg.pname or (parseDrvName pkg.name).name; 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; mockPkgs = import ../misc/nameMockedPkgs.nix prev;
defaultPkgName = findFirst (x: (tryEval x).success) defaultPkgName = findFirst (x: (tryEval x).success)
@ -69,7 +67,6 @@ in
[ [
(assert config.pname != null; config.pname) (assert config.pname != null; config.pname)
(getName (mockPkgs.callPackage config.packages.default { })) (getName (mockPkgs.callPackage config.packages.default { }))
(getName (baseNixpkgs.callPackage config.packages.default { }))
(getName (import inputs.nixpkgs { (getName (import inputs.nixpkgs {
inherit (prev.stdenv.hostPlatform) system; inherit (prev.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config; inherit (config.nixpkgs) config;