summaryrefslogtreecommitdiff
path: root/mars.nix
blob: 6e55997c69602af59af62a97f886b8baff17c759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ stdenv
, fetchurl
, makeWrapper
, jre
}:

stdenv.mkDerivation rec {
  name = "mars-${version}";
  version = "4.5";
  src = fetchurl {
    url = "http://courses.missouristate.edu/KenVollmar/mars/MARS_4_5_Aug2014/Mars4_5.jar";
    sha256 = "15kh1fahkkbbf4wvb6ijzny4fi5dh4pycxyzp5325dm2ddkhnd5c";
  };
  phases = "installPhase";
  buildInputs = [ makeWrapper ];
  installPhase = ''
    mkdir -p $out/bin
    makeWrapper "${jre}/bin/java -jar ${src}" $out/bin/mars
  '';
}