2024-06-30 08:16:52 +00:00
|
|
|
{
|
|
|
|
callPackage,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
rustPlatform,
|
|
|
|
libiconv,
|
|
|
|
Security,
|
2024-05-02 00:46:19 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "maturin";
|
|
|
|
version = "1.5.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
|
|
|
repo = "maturin";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-3rID2epV1pCwpofFf9Wuafs1SlBWH7e7/4HPaSUAriQ=";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoHash = "sha256-hPyPMQm/Oege0PPjYIrd1fEDOGqoQ1ffS2l6o8je4t4=";
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
Security
|
|
|
|
libiconv
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
# Requires network access, fails in sandbox.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-30 08:16:52 +00:00
|
|
|
passthru.tests.pyo3 = callPackage ./pyo3-test { };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Build and publish Rust crates Python packages";
|
|
|
|
mainProgram = "maturin";
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/PyO3/maturin";
|
|
|
|
changelog = "https://github.com/PyO3/maturin/blob/v${version}/Changelog.md";
|
2024-06-30 08:16:52 +00:00
|
|
|
license = with licenses; [
|
|
|
|
asl20 # or
|
|
|
|
mit
|
|
|
|
];
|
2024-05-02 00:46:19 +00:00
|
|
|
maintainers = [ ];
|
|
|
|
};
|
|
|
|
}
|