2021-02-18 09:17:28 +01:00
|
|
|
{ callPackage
|
|
|
|
, lib
|
2021-02-12 10:47:30 +01:00
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, dbus
|
2021-05-21 08:47:40 +02:00
|
|
|
, libiconv
|
2021-02-12 10:47:30 +01:00
|
|
|
, Security
|
|
|
|
}:
|
2018-10-30 16:36:21 +01:00
|
|
|
|
2021-02-12 10:45:00 +01:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-02-11 15:04:30 +01:00
|
|
|
pname = "maturin";
|
2022-02-19 15:24:08 +01:00
|
|
|
version = "0.12.9";
|
2018-10-30 16:36:21 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
2019-08-30 20:59:44 +02:00
|
|
|
repo = "maturin";
|
2018-10-30 16:36:21 +01:00
|
|
|
rev = "v${version}";
|
2022-02-19 15:24:08 +01:00
|
|
|
hash = "sha256-FskCBviLl1yafPOlsp/IjaEOlGUuWLcGlxDrNA/qf8k=";
|
2018-10-30 16:36:21 +01:00
|
|
|
};
|
|
|
|
|
2022-02-19 15:24:08 +01:00
|
|
|
cargoHash = "sha256-zakSQptKK/X/8MDJxRUHTDIGPh77cq5PrOmPEneD0YM=";
|
2018-10-30 16:36:21 +01:00
|
|
|
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-10-30 16:36:21 +01:00
|
|
|
|
2021-05-21 08:47:40 +02:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ dbus ]
|
|
|
|
++ lib.optionals stdenv.isDarwin [ Security libiconv ];
|
2018-10-30 16:36:21 +01:00
|
|
|
|
|
|
|
# Requires network access, fails in sandbox.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-02-18 09:17:28 +01:00
|
|
|
passthru.tests.pyo3 = callPackage ./pyo3-test {};
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2021-02-14 03:24:18 +01: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-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PyO3/maturin";
|
2021-02-14 03:24:18 +01:00
|
|
|
license = licenses.asl20;
|
2021-09-12 16:42:12 +02:00
|
|
|
maintainers = [ ];
|
2018-10-30 16:36:21 +01:00
|
|
|
};
|
|
|
|
}
|