Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / riscof / default.nix
blobfc5874e39e3300036e0f1ddd006210d105639123
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , git
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 = [
45     "riscof"
46   ];
48   # No unitests available
49   doCheck = false;
51   meta = with lib; {
52     description = "RISC-V Architectural Test Framework";
53     homepage = "https://github.com/riscv-software-src/riscof";
54     changelog = "https://github.com/riscv-software-src/riscof/blob/${version}/CHANGELOG.md";
55     maintainers = with maintainers; [ genericnerdyusername ];
56     license = licenses.bsd3;
57   };