mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-22 22:11:50 +03:00
70e3c93c39
phaer/dream2nix-examples
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
|
|
];
|
|
}
|