1{ buildPythonPackage
2, fetchFromGitHub
3, lib
4, git
5, riscv-isac
6, riscv-config
7, jinja2
8}:
9
10buildPythonPackage rec {
11 pname = "riscof";
12 version = "1.25.3";
13
14 src = fetchFromGitHub {
15 owner = "riscv-software-src";
16 repo = pname;
17 rev = "refs/tags/${version}";
18 hash = "sha256-ToI2xI0fvnDR+hJ++T4ss5X3gc4G6Cj1uJHx0m2X7GY=";
19 };
20
21 postPatch = "substituteInPlace riscof/requirements.txt --replace 'GitPython==3.1.17' GitPython";
22
23 propagatedBuildInputs = [ riscv-isac riscv-config jinja2 ];
24
25 patches = [
26 # riscof copies a template directory from the store, but breaks because it doesn't change permissions and expects it to be writeable
27 ./make_writeable.patch
28 ];
29
30 meta = with lib; {
31 homepage = "https://github.com/riscv-software-src/riscof";
32 description = "RISC-V Architectural Test Framework";
33 maintainers = with maintainers; [ genericnerdyusername ];
34 license = licenses.bsd3;
35 };
36}