Skip to content

Commit e618af8

Browse files
committed
Set darwin SDK version to prevent rebuilding of opencv-python
1 parent 13d252c commit e618af8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

flake.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,24 @@
3939
let
4040
pkgs = nixpkgs.legacyPackages.${system};
4141
inherit (nixpkgs) lib;
42-
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
4342

43+
python = pkgs.python312;
44+
45+
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
4446
overlay = workspace.mkPyprojectOverlay {
4547
sourcePreference = "wheel";
4648
};
4749

4850
pythonSets =
4951
let
5052
baseSet = pkgs.callPackage pyproject-nix.build.packages {
51-
python = pkgs.python312;
53+
inherit python;
54+
stdenv = pkgs.stdenv.override {
55+
targetPlatform = pkgs.stdenv.targetPlatform // {
56+
# allow downloading of opencv-python wheel
57+
darwinSdkVersion = "15.2";
58+
};
59+
};
5260
};
5361

5462
pillowHeifOverrides = import ./lib/overrides-pillow-heif.nix { inherit pkgs; };
@@ -135,7 +143,7 @@
135143
nodejs
136144
postgresql.dev
137145
pre-commit
138-
pythonSets.python
146+
python
139147
tailwindcss
140148
uv2nix.packages.${system}.uv-bin
141149
watchman

0 commit comments

Comments
 (0)