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

36 lines
979 B
Nix

{ stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkgconfig
, darwin }:
let
inherit (darwin.apple_sdk.frameworks) Security;
in rustPlatform.buildRustPackage rec {
name = "maturin-${version}";
version = "0.7.9";
src = fetchFromGitHub {
owner = "PyO3";
repo = "maturin";
rev = "v${version}";
sha256 = "1l8i1mz97zsc8kayvryv6xznwpby9k9jxy7lsx45acs5yksqchrv";
};
cargoSha256 = "0ly0f64acn1hxnj7vg1m860xpl06rklwqh545c386nnxaj839b0r";
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ gmp openssl ]
++ stdenv.lib.optional stdenv.isDarwin Security
++ stdenv.lib.optional stdenv.isLinux dbus;
# Requires network access, fails in sandbox.
doCheck = false;
meta = with stdenv.lib; {
description = "Build and publish crates with pyo3 bindings as python packages";
homepage = https://github.com/PyO3/maturin;
license = licenses.mit;
maintainers = [ maintainers.danieldk ];
platforms = platforms.all;
};
}