1{
2 lib,
3 buildPythonPackage,
4 cerberus,
5 fetchFromGitHub,
6 fetchpatch,
7 pythonOlder,
8 pyyaml,
9 ruamel-yaml,
10 setuptools,
11 pythonRelaxDepsHook,
12}:
13
14buildPythonPackage rec {
15 pname = "riscv-config";
16 version = "3.18.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "riscv-software-src";
23 repo = "riscv-config";
24 rev = "refs/tags/${version}";
25 hash = "sha256-ADmf7EN3D+8isZRFx6WRMYq91YHunGavuwy3a3M3gCc=";
26 };
27
28 pythonRelaxDeps = [ "pyyaml" ];
29
30 build-system = [ setuptools ];
31
32 nativeBuildInputs = [ pythonRelaxDepsHook ];
33
34 dependencies = [
35 cerberus
36 pyyaml
37 ruamel-yaml
38 ];
39
40 # Module has no tests
41 doCheck = false;
42
43 pythonImportsCheck = [ "riscv_config" ];
44
45 meta = with lib; {
46 description = "RISC-V configuration validator";
47 homepage = "https://github.com/riscv/riscv-config";
48 changelog = "https://github.com/riscv-software-src/riscv-config/blob/${version}/CHANGELOG.md";
49 license = licenses.bsd3;
50 maintainers = with maintainers; [ genericnerdyusername ];
51 mainProgram = "riscv-config";
52 };
53}