depot/third_party/nixpkgs/pkgs/development/tools/rust/maturin/default.nix
Default email 29574b70c6 Project import generated by Copybara.
GitOrigin-RevId: 64b4617883844efe0cc20163e007ee636462eb18
2021-02-16 18:04:54 +01:00

45 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, dbus
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "maturin";
version = "0.9.1";
src = fetchFromGitHub {
owner = "PyO3";
repo = "maturin";
rev = "v${version}";
hash = "sha256-0HD/wtHCbaJ0J+TC6k2xvWsCMnpdJbvivW/UM3g+Gss=";
};
cargoHash = "sha256-bH9NQg7wJUe0MHkbt4DbjZEEVYZiVCwSbL4A/H+6WDs=";
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optional stdenv.isLinux dbus
++ lib.optional stdenv.isDarwin Security;
# Requires network access, fails in sandbox.
doCheck = false;
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";
license = licenses.asl20;
maintainers = [ maintainers.danieldk ];
};
}