nixpkgs/pkgs/by-name/ma/maturin/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.4 KiB
Nix
Raw Normal View History

2024-06-12 00:09:27 +00:00
{
callPackage,
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
darwin,
libiconv,
2024-06-12 00:13:03 +00:00
testers,
maturin,
2021-02-12 09:47:30 +00:00
}:
2018-10-30 15:36:21 +00:00
rustPlatform.buildRustPackage rec {
2021-02-11 14:04:30 +00:00
pname = "maturin";
version = "1.6.0";
2018-10-30 15:36:21 +00:00
src = fetchFromGitHub {
owner = "PyO3";
repo = "maturin";
2018-10-30 15:36:21 +00:00
rev = "v${version}";
hash = "sha256-cKX5fDPQElNLAur2PF6J5050QnMNrazMTCVtGmjwmxQ=";
2018-10-30 15:36:21 +00:00
};
cargoHash = "sha256-EuMPcJAGz564cC9UWrlihBxRUJCtqw4jvP/SQgx2L/0=";
2018-10-30 15:36:21 +00:00
2024-06-12 00:09:27 +00:00
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
libiconv
];
2018-10-30 15:36:21 +00:00
# Requires network access, fails in sandbox.
doCheck = false;
2024-06-12 00:13:03 +00:00
passthru = {
tests = {
version = testers.testVersion { package = maturin; };
pyo3 = callPackage ./pyo3-test { };
};
};
meta = {
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.
'';
homepage = "https://github.com/PyO3/maturin";
2023-05-27 04:20:00 +00:00
changelog = "https://github.com/PyO3/maturin/blob/v${version}/Changelog.md";
license = with lib.licenses; [
2024-06-12 00:09:27 +00:00
asl20 # or
mit
];
maintainers = with lib.maintainers; [ getchoo ];
mainProgram = "maturin";
2018-10-30 15:36:21 +00:00
};
}