2018-10-30 15:36:21 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkgconfig
|
|
|
|
, darwin }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security;
|
|
|
|
in rustPlatform.buildRustPackage rec {
|
2019-08-30 19:59:44 +01:00
|
|
|
name = "maturin-${version}";
|
2020-04-10 08:49:58 +01:00
|
|
|
version = "0.8.0";
|
2018-10-30 15:36:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
2019-08-30 19:59:44 +01:00
|
|
|
repo = "maturin";
|
2018-10-30 15:36:21 +00:00
|
|
|
rev = "v${version}";
|
2020-04-10 08:49:58 +01:00
|
|
|
sha256 = "1fjai0c0j8zzaj4c186dkbvx6cpj0vi3sc1qbjbgn2cm8azsd6m6";
|
2018-10-30 15:36:21 +00:00
|
|
|
};
|
|
|
|
|
2020-04-10 08:49:58 +01:00
|
|
|
# The maturin 0.8.0 lockfile has an incorrect version for maturin
|
|
|
|
# itself. The upstream lockfiles are normally correct, so this
|
|
|
|
# should be removed post-0.8.0.
|
|
|
|
cargoPatches = [ ./Cargo.lock.patch ];
|
|
|
|
|
|
|
|
cargoSha256 = "01sh523fi46k5xwdslhnmjz128jkdw47gp9bd8gim3ay13zkcn1i";
|
2018-10-30 15:36:21 +00:00
|
|
|
|
|
|
|
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";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/PyO3/maturin";
|
2018-10-30 15:36:21 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.danieldk ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|