2021-02-12 01:47:30 -08:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, pkg-config
|
|
|
|
, dbus
|
|
|
|
, gmp
|
|
|
|
, openssl
|
|
|
|
, Security
|
|
|
|
}:
|
2018-10-30 08:36:21 -07:00
|
|
|
|
2021-02-12 01:45:00 -08:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-02-11 06:04:30 -08:00
|
|
|
pname = "maturin";
|
2021-01-19 22:31:48 -08:00
|
|
|
version = "0.9.0";
|
2018-10-30 08:36:21 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PyO3";
|
2019-08-30 11:59:44 -07:00
|
|
|
repo = "maturin";
|
2018-10-30 08:36:21 -07:00
|
|
|
rev = "v${version}";
|
2021-02-12 01:47:30 -08:00
|
|
|
hash = "sha256-X5/1zEVhhdTuyXcUwC3jVv9Gblmv8LT+ftsVo8BnnZs=";
|
2018-10-30 08:36:21 -07:00
|
|
|
};
|
|
|
|
|
2021-02-12 01:47:30 -08:00
|
|
|
cargoHash = "sha256-PBmuPIpCwC7fr/MKFaeSd/0avoEATlxoeMHisjouAeI=";
|
2018-10-30 08:36:21 -07:00
|
|
|
|
2021-01-18 22:50:56 -08:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-10-30 08:36:21 -07:00
|
|
|
|
|
|
|
buildInputs = [ gmp openssl ]
|
2021-01-23 04:26:19 -08:00
|
|
|
++ lib.optional stdenv.isDarwin Security
|
|
|
|
++ lib.optional stdenv.isLinux dbus;
|
2018-10-30 08:36:21 -07:00
|
|
|
|
|
|
|
# Requires network access, fails in sandbox.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2018-10-30 08:36:21 -07:00
|
|
|
description = "Build and publish crates with pyo3 bindings as python packages";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/PyO3/maturin";
|
2018-10-30 08:36:21 -07:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.danieldk ];
|
|
|
|
};
|
|
|
|
}
|