nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jinja2,
6 riscv-config,
7 riscv-isac,
8}:
9
10buildPythonPackage rec {
11 pname = "riscof";
12 version = "1.25.3";
13 format = "setuptools";
14
15 src = fetchFromGitHub {
16 owner = "riscv-software-src";
17 repo = "riscof";
18 tag = version;
19 hash = "sha256-ToI2xI0fvnDR+hJ++T4ss5X3gc4G6Cj1uJHx0m2X7GY=";
20 };
21
22 patches = [
23 # riscof copies a template directory from the store, but breaks because it
24 # doesn't change permissions and expects it to be writeable
25 ./make_writeable.patch
26 ];
27
28 postPatch = ''
29 substituteInPlace setup.py \
30 --replace "import pip" ""
31 substituteInPlace riscof/requirements.txt \
32 --replace "GitPython==3.1.17" "GitPython"
33 '';
34
35 propagatedBuildInputs = [
36 riscv-isac
37 riscv-config
38 jinja2
39 ];
40
41 pythonImportsCheck = [ "riscof" ];
42
43 # No unitests available
44 doCheck = false;
45
46 meta = {
47 description = "RISC-V Architectural Test Framework";
48 mainProgram = "riscof";
49 homepage = "https://github.com/riscv-software-src/riscof";
50 changelog = "https://github.com/riscv-software-src/riscof/blob/${version}/CHANGELOG.md";
51 maintainers = [ ];
52 license = lib.licenses.bsd3;
53 };
54}