depot/third_party/nixpkgs/pkgs/development/tools/rust/maturin/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

45 lines
1.2 KiB
Nix

{ callPackage
, lib
, stdenv
, fetchFromGitHub
, rustPlatform
, libiconv
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "maturin";
version = "1.2.3";
src = fetchFromGitHub {
owner = "PyO3";
repo = "maturin";
rev = "v${version}";
hash = "sha256-hxtT5cL1PTXkTXGB0nVPhMI8Vlqrk4q2MHW0KGosFwc=";
};
cargoHash = "sha256-IZWh/Bp9TdB+flc1PXVkwrIdOr83TFk6X6O5M0FVaO4=";
buildInputs = lib.optionals stdenv.isDarwin [ Security libiconv ];
# Requires network access, fails in sandbox.
doCheck = false;
passthru.tests.pyo3 = callPackage ./pyo3-test {};
meta = with lib; {
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";
changelog = "https://github.com/PyO3/maturin/blob/v${version}/Changelog.md";
license = with licenses; [ asl20 /* or */ mit ];
maintainers = [ ];
};
}