Skip to content

Commit 30829e1

Browse files
committed
fixup! fixup! Allow overriding which Python version is used when building the Opsqueue Python library
1 parent b20815e commit 30829e1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libs/opsqueue_python/opsqueue_python.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
rustToolchain,
88

99
# Native build dependencies:
10-
python3,
10+
python,
1111
maturin,
1212
buildPythonPackage,
1313
perl,
@@ -38,7 +38,7 @@ let
3838
commonArgs = {
3939
inherit src version pname;
4040
strictDeps = true;
41-
nativeBuildInputs = [ python3 ];
41+
nativeBuildInputs = [ python ];
4242
cargoExtraArgs = "--package opsqueue_python";
4343
};
4444
cargoArtifacts = craneLib.buildDepsOnly (commonArgs // { pname = pname; });
@@ -50,6 +50,7 @@ let
5050
(craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; })).overrideAttrs
5151
(old: {
5252
nativeBuildInputs = old.nativeBuildInputs ++ [ maturin ];
53+
env.PYO3_PYTHON = python.interpreter;
5354

5455
# We intentionally _override_ rather than extend the buildPhase
5556
# as Maturin itself calls `cargo build`, no need to call it twice.

0 commit comments

Comments
 (0)