-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathckzg.nix
58 lines (47 loc) · 1.11 KB
/
ckzg.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
lib,
fetchFromGitHub,
clang,
buildPythonPackage,
python,
pythonOlder,
pyyaml,
blst,
setuptools,
}:
buildPythonPackage rec {
pname = "ckzg";
version = "2.0.1";
pyproject = true;
src = fetchFromGitHub {
owner = "ethereum";
repo = "c-kzg-4844";
tag = "v${version}";
hash = "sha256-kOoodri80p5tz8RlMz6mqsZRAuXBxZm4vr+VWJEtfA0=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ clang ];
dependencies = [
pyyaml
blst
];
postPatch = ''
# unvendor "blst"
substituteInPlace setup.py \
--replace-fail '"build_ext": CustomBuild,' ""
'';
checkPhase = ''
runHook preCheck
cd bindings/python
${python.interpreter} tests.py
runHook postCheck
'';
pythonImportsCheck = [ "ckzg" ];
meta = {
description = "Minimal implementation of the Polynomial Commitments API for EIP-4844 and EIP-7594";
homepage = "https://github.com/ethereum/c-kzg-4844";
changelog = "https://github.com/ethereum/c-kzg-4844/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ hellwolf ];
};
}