mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 06:21:30 +03:00
41 lines
717 B
Nix
41 lines
717 B
Nix
|
# maturin in nixpkgs only contains the binary, as nixpkgs itself
|
||
|
# uses its own maturin-build-hook. We do need upstreams python
|
||
|
# import hook as well for pep517 builds.
|
||
|
{
|
||
|
python3,
|
||
|
maturin,
|
||
|
rustPlatform,
|
||
|
cargo,
|
||
|
rustc,
|
||
|
pkg-config,
|
||
|
openssl,
|
||
|
}:
|
||
|
python3.pkgs.buildPythonPackage rec {
|
||
|
inherit (maturin) pname version src;
|
||
|
|
||
|
pythonImportsCheck = [
|
||
|
"maturin"
|
||
|
];
|
||
|
|
||
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
||
|
inherit src;
|
||
|
name = "${pname}-${version}";
|
||
|
hash = maturin.cargoHash;
|
||
|
};
|
||
|
|
||
|
nativeBuildInputs = [
|
||
|
cargo
|
||
|
rustPlatform.cargoSetupHook
|
||
|
rustc
|
||
|
pkg-config
|
||
|
];
|
||
|
|
||
|
buildInputs = [
|
||
|
openssl.dev
|
||
|
];
|
||
|
|
||
|
propagatedBuildInputs = [
|
||
|
python3.pkgs.setuptools-rust
|
||
|
];
|
||
|
}
|