python3Packages.riscof: init at 1.25.2
This commit is contained in:
parent
6f2d5c582b
commit
530af6b5b9
36
pkgs/development/python-modules/riscof/default.nix
Normal file
36
pkgs/development/python-modules/riscof/default.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{ buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, lib
|
||||||
|
, git
|
||||||
|
, riscv-isac
|
||||||
|
, riscv-config
|
||||||
|
, jinja2
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "riscof";
|
||||||
|
version = "1.25.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "riscv-software-src";
|
||||||
|
repo = pname;
|
||||||
|
rev = "1.25.2";
|
||||||
|
hash = "sha256-6jiKBGj4NN038/qq3ze+L0MYpQEEaN5xt4CTWu0i4qs=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = "substituteInPlace riscof/requirements.txt --replace 'GitPython==3.1.17' GitPython";
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ riscv-isac riscv-config jinja2 ];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# riscof copies a template directory from the store, but breaks because it doesn't change permissions and expects it to be writeable
|
||||||
|
./make_writeable.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://github.com/riscv-software-src/riscof";
|
||||||
|
description = "RISC-V Architectural Test Framework";
|
||||||
|
maintainers = with maintainers; [ genericnerdyusername ];
|
||||||
|
license = licenses.bsd3;
|
||||||
|
};
|
||||||
|
}
|
25
pkgs/development/python-modules/riscof/make_writeable.patch
Normal file
25
pkgs/development/python-modules/riscof/make_writeable.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff --git a/riscof/cli.py b/riscof/cli.py
|
||||||
|
index 26af62e..9d0ddbf 100644
|
||||||
|
--- a/riscof/cli.py
|
||||||
|
+++ b/riscof/cli.py
|
||||||
|
@@ -502,6 +502,7 @@ def setup(dutname,refname,work_dir):
|
||||||
|
src = os.path.join(constants.root, "Templates/setup/model/")
|
||||||
|
dest = os.path.join(cwd, dutname)
|
||||||
|
distutils.dir_util.copy_tree(src, dest)
|
||||||
|
+ os.system(f"chmod +w -R '{dest}'")
|
||||||
|
|
||||||
|
os.rename(cwd+'/'+dutname+'/model_isa.yaml',
|
||||||
|
cwd+'/'+dutname+'/'+dutname+'_isa.yaml')
|
||||||
|
@@ -525,10 +526,12 @@ def setup(dutname,refname,work_dir):
|
||||||
|
src = os.path.join(constants.root, "Templates/setup/sail_cSim/")
|
||||||
|
dest = os.path.join(cwd, refname)
|
||||||
|
distutils.dir_util.copy_tree(src, dest)
|
||||||
|
+ os.system(f"chmod +w -R '{dest}'")
|
||||||
|
else:
|
||||||
|
src = os.path.join(constants.root, "Templates/setup/reference/")
|
||||||
|
dest = os.path.join(cwd, refname)
|
||||||
|
distutils.dir_util.copy_tree(src, dest)
|
||||||
|
+ os.system(f"chmod +w -R '{dest}'")
|
||||||
|
os.rename(cwd+'/'+refname+'/riscof_model.py',
|
||||||
|
cwd+'/'+refname+'/riscof_'+refname+'.py')
|
||||||
|
with open(cwd+'/'+refname+'/riscof_'+refname+'.py', 'r') as file :
|
@ -10057,6 +10057,8 @@ self: super: with self; {
|
|||||||
|
|
||||||
ripser = callPackage ../development/python-modules/ripser { };
|
ripser = callPackage ../development/python-modules/ripser { };
|
||||||
|
|
||||||
|
riscof = callPackage ../development/python-modules/riscof { };
|
||||||
|
|
||||||
riscv-config = callPackage ../development/python-modules/riscv-config { };
|
riscv-config = callPackage ../development/python-modules/riscv-config { };
|
||||||
|
|
||||||
riscv-isac = callPackage ../development/python-modules/riscv-isac { };
|
riscv-isac = callPackage ../development/python-modules/riscv-isac { };
|
||||||
|
Loading…
Reference in New Issue
Block a user