1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 jinja2, 6 pythonOlder, 7 riscv-config, 8 riscv-isac, 9}: 10 11buildPythonPackage rec { 12 pname = "riscof"; 13 version = "1.25.3"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchFromGitHub { 19 owner = "riscv-software-src"; 20 repo = "riscof"; 21 tag = version; 22 hash = "sha256-ToI2xI0fvnDR+hJ++T4ss5X3gc4G6Cj1uJHx0m2X7GY="; 23 }; 24 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 ]; 30 31 postPatch = '' 32 substituteInPlace setup.py \ 33 --replace "import pip" "" 34 substituteInPlace riscof/requirements.txt \ 35 --replace "GitPython==3.1.17" "GitPython" 36 ''; 37 38 propagatedBuildInputs = [ 39 riscv-isac 40 riscv-config 41 jinja2 42 ]; 43 44 pythonImportsCheck = [ "riscof" ]; 45 46 # No unitests available 47 doCheck = false; 48 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 }; 57}