From dc11ba42cbbf757238d34449a61dfcf0ee16c0df Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 1 May 2023 12:11:06 -0600 Subject: pkgs/simple-scalar: add wattchg7 --- pkgs/simple-scalar/simplesim.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 pkgs/simple-scalar/simplesim.nix (limited to 'pkgs/simple-scalar/simplesim.nix') 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/ + ''); +} -- cgit v1.2.3