mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 10:43:27 +00:00
50 lines
927 B
Nix
50 lines
927 B
Nix
{ buildPythonPackage
|
|
, lib
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, rustPlatform
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "chia-rs";
|
|
version = "0.1.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "chia-network";
|
|
repo = "chia_rs";
|
|
rev = version;
|
|
sha256 = "sha256-4TIRj7FMIArI/EvDARReC4MqDG44zjn/MKoUHAVqq5s=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.importCargoLock {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
postPatch = ''
|
|
cp ${./Cargo.lock} Cargo.lock
|
|
'';
|
|
|
|
nativeBuildInputs = with rustPlatform; [
|
|
cargoSetupHook
|
|
maturinBuildHook
|
|
];
|
|
|
|
preBuild = ''
|
|
# avoid ENOENT in maturinBuildHook
|
|
touch wheel/Cargo.lock
|
|
'';
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
buildAndTestSubdir = "wheel";
|
|
|
|
meta = with lib; {
|
|
description = "Rust crate & wheel with consensus code";
|
|
homepage = "https://github.com/Chia-Network/chia_rs/";
|
|
license = licenses.asl20;
|
|
maintainers = teams.chia.members;
|
|
};
|
|
}
|