Skip to content

Commit

Permalink
build: Add pkgs to set
Browse files Browse the repository at this point in the history
To be able to easily extract packages/buildPackages easier when creating overrides.
  • Loading branch information
adisbladis committed Feb 13, 2025
1 parent 9b43213 commit 3ee4005
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
12 changes: 10 additions & 2 deletions build/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ let
stdenv,
pythonPkgsBuildHost,
pkgsFinal,
pkgs,
}:
{
inherit python stdenv pythonPkgsBuildHost;
inherit
python
pkgs
stdenv
pythonPkgsBuildHost
;

# Initialize dependency resolvers
resolveBuildSystem = mkResolveBuildSystem pythonPkgsBuildHost;
Expand Down Expand Up @@ -90,6 +96,7 @@ in
newScope,
buildPackages,
stdenv,
pkgs,
}:
makeScope newScope (
final:
Expand Down Expand Up @@ -139,7 +146,7 @@ makeScope newScope (
throw "${name} ${spec}";
}
// (mkPythonSet {
inherit python stdenv;
inherit python stdenv pkgs;
pkgsFinal = final;
pythonPkgsBuildHost = final.pythonPkgsHostHost;
})
Expand All @@ -156,6 +163,7 @@ makeScope newScope (
python = python.pythonOnBuildForHost;
inherit (final) pythonPkgsBuildHost;
inherit pkgsFinal;
pkgs = buildPackages;
}
))
else
Expand Down
10 changes: 6 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,14 @@
pkgs.runCommand "typing-check"
{
nativeBuildInputs = [
(pkgs.basedpyright.overrideAttrs(old: {
(pkgs.basedpyright.overrideAttrs (old: {
# Nixpkgs build of basedpyright is broken because of a dangling symlinks check
postInstall = old.postInstall + ''
postInstall =
old.postInstall
+ ''
find -L $out -type l -print -delete
'';
find -L $out -type l -print -delete
'';
}))
pkgs.python3
];
Expand Down

0 comments on commit 3ee4005

Please sign in to comment.