summaryrefslogtreecommitdiff
path: root/pkgs/simple-scalar/simplesim.nix
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-05-01 12:11:06 -0600
committerAlejandro Soto <alejandro@34project.org>2023-05-01 12:11:06 -0600
commitdc11ba42cbbf757238d34449a61dfcf0ee16c0df (patch)
tree34163f6989ffe8216e86020db1a4905eda92b144 /pkgs/simple-scalar/simplesim.nix
parent8413062d39c4e0344edd229f6a01fb2c46a5d94c (diff)
pkgs/simple-scalar: add wattchg7
Diffstat (limited to '')
-rw-r--r--pkgs/simple-scalar/simplesim.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/simple-scalar/simplesim.nix b/pkgs/simple-scalar/simplesim.nix
new file mode 100644
index 0000000..3b73267
--- /dev/null
+++ b/pkgs/simple-scalar/simplesim.nix
@@ -0,0 +1,35 @@
+{ fetchFromGitHub, stdenv, isWattch ? false }:
+stdenv.mkDerivation {
+ pname = if isWattch then "wattchg7" else "SimpleSim";
+ version = if isWattch then "master-2014-03-20" else "2003-10-08"; # !!!
+
+ src =
+ if isWattch
+ then
+ fetchFromGitHub
+ {
+ repo = "wattchg7";
+ owner = "n-sreek";
+
+ rev = "b1c2c1447584b7e850c6dc0743a2209c9d021a39";
+ sha256 = "sha256-JMM2+6dgReSP3MKSC0ZOYt0Pcmef8DRzIkC26e4dk+Y=";
+ } else
+ fetchTarball {
+ name = "simplesim-3.0";
+
+ url = "https://www.cse.iitd.ac.in/~cs5070217/csl718/simplesim-3v0d.tgz";
+ sha256 = "sha256:022rlniimzl30c1874765hl001dxc716vfwm40ij256h1qk2dwgw";
+ };
+
+ configurePhase = ''
+ make config-pisa
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ '' + (if isWattch then ''
+ cp sim-outorder $out/bin/wattch-outorder
+ '' else ''
+ cp {sim-{outorder,cache,profile,bpred,eio,safe,fast},sysprobe} $out/bin/
+ '');
+}