2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, dbus, gmp, openssl, pkgconfig
|
2018-10-30 16:36:21 +01:00
|
|
|
, darwin }:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (darwin.apple_sdk.frameworks) Security;
|
|
|
|
in rustPlatform.buildRustPackage rec {
|
2019-08-30 20:59:44 +02:00
|
|
|
name = "maturin-${version}";
|
2020-08-23 08:26:43 +02:00
|
|
|
version = "0.8.3";
|
2018-10-30 16:36:21 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
2019-08-30 20:59:44 +02:00
|
|
|
repo = "maturin";
|
2018-10-30 16:36:21 +01:00
|
|
|
rev = "v${version}";
|
2020-08-23 08:26:43 +02:00
|
|
|
sha256 = "08l5r7d75id6qzf8xhkjv4hkdr64cq4dbcmdjywmvf9szjbnr65z";
|
2018-10-30 16:36:21 +01:00
|
|
|
};
|
|
|
|
|
2020-08-23 08:26:43 +02:00
|
|
|
cargoSha256 = "1n0sxkhcdg2rbzqd7826pa7sxlnn0c2sc8l6lc98xw21vvqisc8n";
|
2018-10-30 16:36:21 +01: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;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-10-30 16:36:21 +01:00
|
|
|
description = "Build and publish crates with pyo3 bindings as python packages";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/PyO3/maturin";
|
2018-10-30 16:36:21 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.danieldk ];
|
|
|
|
};
|
|
|
|
}
|