diff options
Diffstat (limited to 'pkgs/development/python-modules/kornia-rs')
-rw-r--r-- | pkgs/development/python-modules/kornia-rs/default.nix | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/kornia-rs/default.nix b/pkgs/development/python-modules/kornia-rs/default.nix index 57aaa325d2b61..c1337f87f7fae 100644 --- a/pkgs/development/python-modules/kornia-rs/default.nix +++ b/pkgs/development/python-modules/kornia-rs/default.nix @@ -1,10 +1,13 @@ -{ lib -, fetchFromGitHub -, buildPythonPackage -, rustPlatform -, cmake -, nasm -, substituteAll +{ + lib, + stdenv, + fetchFromGitHub, + buildPythonPackage, + rustPlatform, + cmake, + nasm, + substituteAll, + libiconv, }: buildPythonPackage rec { @@ -26,10 +29,10 @@ buildPythonPackage rec { nasm # Only for dependencies. ]; + buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv; + cargoRoot = "py-kornia"; - cargoDeps = rustPlatform.importCargoLock { - lockFile = ./Cargo.lock; - }; + cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; }; # The path dependency doesn't vendor the dependencies correctly, so get kornia-rs from crates instead. patches = [ @@ -43,7 +46,10 @@ buildPythonPackage rec { cp ${./Cargo.lock} py-kornia/Cargo.lock ''; - maturinBuildFlags = [ "-m" "py-kornia/Cargo.toml" ]; + maturinBuildFlags = [ + "-m" + "py-kornia/Cargo.toml" + ]; dontUseCmakeConfigure = true; # We only want to use CMake to build some Rust dependencies. |