Skip to content

Commit de384fd

Browse files
committed
Improve Nix Python imports check
1 parent 148d000 commit de384fd

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

libs/opsqueue_python/opsqueue_python.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,16 @@ buildPythonPackage {
106106
version = crateName.version;
107107
src = "${crateWheel}/${wheelName}";
108108
doCheck = false;
109-
pythonImportsCheck = [ "opsqueue" ];
109+
pythonImportsCheck = [
110+
"opsqueue"
111+
# Internal: This is the most important one!
112+
"opsqueue.opsqueue_internal"
113+
# Visible:
114+
"opsqueue.producer"
115+
"opsqueue.consumer"
116+
"opsqueue.exceptions"
117+
"opsqueue.common"
118+
];
110119

111120
propagatedBuildInputs = [
112121
cbor2

nix/overlay.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ let
1515

1616
crane = import sources.crane { pkgs = final; };
1717
craneLib = crane.overrideToolchain (pkgs: rustToolchain);
18+
python3 = final.python313.override { packageOverrides = pythonOverlay; };
1819
in
1920
{
20-
inherit rustToolchain;
21-
opsqueue = final.callPackage ../opsqueue/opsqueue.nix { };
21+
inherit rustToolchain python3;
22+
python = python3;
2223

23-
python = prev.python312.override { packageOverrides = pythonOverlay; };
24+
opsqueue = final.callPackage ../opsqueue/opsqueue.nix { };
2425

2526
}

0 commit comments

Comments
 (0)