summaryrefslogtreecommitdiff
path: root/pkgs/simple-scalar/simplesim.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/simple-scalar/simplesim.nix')
-rw-r--r--pkgs/simple-scalar/simplesim.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/simple-scalar/simplesim.nix b/pkgs/simple-scalar/simplesim.nix
new file mode 100644
index 0000000..43bc656
--- /dev/null
+++ b/pkgs/simple-scalar/simplesim.nix
@@ -0,0 +1,52 @@
+{
+ 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/
+ ''
+ );
+}