2021-03-19 17:17:44 +00:00
|
|
|
{ callPackage
|
|
|
|
, lib
|
2021-02-13 14:23:35 +00:00
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, dbus
|
2021-05-28 09:39:13 +00:00
|
|
|
, libiconv
|
2021-02-13 14:23:35 +00:00
|
|
|
, Security
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "maturin";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "0.11.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
|
|
|
repo = "maturin";
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
hash = "sha256-jWkrjFQg0EqM+e/IT2n2E4lGL2kT/Wz7r5BLlzvWSO0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
cargoHash = "sha256-+kXwMGeE2HD59EU0Dzvg8I6LcHiPV7SKSFqnCTfkKwY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ dbus ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security libiconv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Requires network access, fails in sandbox.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
passthru.tests.pyo3 = callPackage ./pyo3-test {};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-02-16 17:04:54 +00:00
|
|
|
description = "Build and publish Rust crates Python packages";
|
|
|
|
longDescription = ''
|
|
|
|
Build and publish Rust crates with PyO3, rust-cpython, and
|
|
|
|
cffi bindings as well as Rust binaries as Python packages.
|
|
|
|
|
|
|
|
This project is meant as a zero-configuration replacement for
|
|
|
|
setuptools-rust and Milksnake. It supports building wheels for
|
|
|
|
Python and can upload them to PyPI.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/PyO3/maturin";
|
2021-02-16 17:04:54 +00:00
|
|
|
license = licenses.asl20;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|