@@ -0,0 +1,47 @@
1+{ lib
2+, fetchFromGitHub
3+, buildPythonPackage
4+, rustPlatform
5+, pythonOlder
6+, openssl
7+, perl
8+}:
9+
10+buildPythonPackage rec {
11+ pname = "clvm_rs";
12+ version = "0.1.7";
13+ disabled = pythonOlder "3.7";
14+
15+ src = fetchFromGitHub {
16+ owner = "Chia-Network";
17+ repo = "clvm_rs";
18+ rev = version;
19+ sha256 = "sha256-ves23q1uQ3lexwK9l1xGRss05jYObJDi/aY9Yvp4aPU=";
20+ };
21+
22+ cargoDeps = rustPlatform.fetchCargoTarball {
23+ inherit src;
24+ name = "${pname}-${version}";
25+ hash = "sha256-3kPzM2EX61ZvU6VKXY1OG/ic+9FU3Et4RuKp+3QYzSo=";
26+ };
27+
28+ format = "pyproject";
29+
30+ nativeBuildInputs = [
31+ perl # used by openssl-sys to configure
32+ ] ++ (with rustPlatform; [
33+ cargoSetupHook
34+ maturinBuildHook
35+ ]);
36+
37+ buildInputs = [ openssl ];
38+
39+ pythonImportsCheck = [ "clvm_rs" ];
40+
41+ meta = with lib; {
42+ homepage = "https://chialisp.com/";
43+ description = "Rust implementation of clvm";
44+ license = licenses.asl20;
45+ maintainers = teams.chia.members;
46+ };
47+}