evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / riscof / default.nix
blob8debd6ea4657e8f3986c44392a87597d92a6aea4
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   jinja2,
6   pythonOlder,
7   riscv-config,
8   riscv-isac,
9 }:
11 buildPythonPackage rec {
12   pname = "riscof";
13   version = "1.25.3";
14   format = "setuptools";
16   disabled = pythonOlder "3.6";
18   src = fetchFromGitHub {
19     owner = "riscv-software-src";
20     repo = pname;
21     rev = "refs/tags/${version}";
22     hash = "sha256-ToI2xI0fvnDR+hJ++T4ss5X3gc4G6Cj1uJHx0m2X7GY=";
23   };
25   patches = [
26     # riscof copies a template directory from the store, but breaks because it
27     # doesn't change permissions and expects it to be writeable
28     ./make_writeable.patch
29   ];
31   postPatch = ''
32     substituteInPlace setup.py \
33       --replace "import pip" ""
34     substituteInPlace riscof/requirements.txt \
35       --replace "GitPython==3.1.17" "GitPython"
36   '';
38   propagatedBuildInputs = [
39     riscv-isac
40     riscv-config
41     jinja2
42   ];
44   pythonImportsCheck = [ "riscof" ];
46   # No unitests available
47   doCheck = false;
49   meta = with lib; {
50     description = "RISC-V Architectural Test Framework";
51     mainProgram = "riscof";
52     homepage = "https://github.com/riscv-software-src/riscof";
53     changelog = "https://github.com/riscv-software-src/riscof/blob/${version}/CHANGELOG.md";
54     maintainers = with maintainers; [ genericnerdyusername ];
55     license = licenses.bsd3;
56   };