{ 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/ '' ); }