Unverified Commit 3cc9649b authored by Arne Keller's avatar Arne Keller Committed by GitHub
Browse files

python312Packages.kornia-rs: use fetchCargoVendor (#391871)

parents b107b36e f9818e0d
Loading
Loading
Loading
Loading
+0 −1598

File deleted.

Preview size limit exceeded, changes collapsed.

+9 −13
Original line number Diff line number Diff line
@@ -6,7 +6,6 @@
  rustPlatform,
  cmake,
  nasm,
  replaceVars,
  libiconv,
}:

@@ -32,18 +31,15 @@ buildPythonPackage rec {
  buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;

  cargoRoot = "py-kornia";
  cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };

  # The path dependency doesn't vendor the dependencies correctly, so get kornia-rs from crates instead.
  patches = [
    (replaceVars ./kornia-rs-from-crates.patch {
      inherit version;
    })
  ];

  prePatch = ''
    cp ${./Cargo.lock} py-kornia/Cargo.lock
  '';
  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit
      pname
      version
      src
      cargoRoot
      ;
    hash = "sha256-VQtPfTmT9UGM0fIMeZF/1lUqQeyP63naoYZ7UuL6hFg=";
  };

  maturinBuildFlags = [
    "-m"
+0 −12
Original line number Diff line number Diff line
diff --git a/py-kornia/Cargo.toml b/py-kornia/Cargo.toml
index e0563f3..e192654 100644
--- a/py-kornia/Cargo.toml
+++ b/py-kornia/Cargo.toml
@@ -9,6 +9,6 @@ crate-type = ["cdylib"]

 [dependencies]
 anyhow = "1.0.80"
-kornia-rs = { path = ".." }
+kornia-rs = { version = "@version@" }
 pyo3 = { version = "0.20", features = ["extension-module"] }
 numpy = { version = "0.20.0" }