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