nixpkgs-suyu/pkgs/development/tools/rust/maturin/default.nix

49 lines
1.2 KiB
Nix
Raw Normal View History

{ callPackage
, lib
2021-02-12 10:47:30 +01:00
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, dbus
, Security
}:
2018-10-30 16:36:21 +01:00
rustPlatform.buildRustPackage rec {
2021-02-11 15:04:30 +01:00
pname = "maturin";
version = "0.10.5";
2018-10-30 16:36:21 +01:00
src = fetchFromGitHub {
owner = "PyO3";
repo = "maturin";
2018-10-30 16:36:21 +01:00
rev = "v${version}";
hash = "sha256-wI5bk9LauIfT4aEo1pCtUicXn0mJb4ijqV0NI6rKL6k=";
2018-10-30 16:36:21 +01:00
};
cargoHash = "sha256-xLT3QeLDZnPrW1rCa0E1DrCYiqhb04o3vdi8pdJdWJQ=";
2018-10-30 16:36:21 +01:00
nativeBuildInputs = [ pkg-config ];
2018-10-30 16:36:21 +01:00
buildInputs = lib.optional stdenv.isLinux dbus
++ lib.optional stdenv.isDarwin Security;
2018-10-30 16:36:21 +01:00
# Requires network access, fails in sandbox.
doCheck = false;
passthru.tests.pyo3 = callPackage ./pyo3-test {};
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.
'';
homepage = "https://github.com/PyO3/maturin";
2021-02-14 03:24:18 +01:00
license = licenses.asl20;
2018-10-30 16:36:21 +01:00
maintainers = [ maintainers.danieldk ];
};
}