diff options
author | Damien Cassou <damien.cassou@gmail.com> | 2015-02-13 15:58:29 +0100 |
---|---|---|
committer | Damien Cassou <damien.cassou@gmail.com> | 2015-02-13 16:06:19 +0100 |
commit | e7a161d4f22fdce9fceb649e94fdd5e53edc1dff (patch) | |
tree | 4ba73726e751fee0072eeab9eaf16635e74af0f7 /pkgs/applications/science/programming | |
parent | 96d6344b131cad5af56ecef5cef7b4fd515e1982 (diff) |
New package PLM: Programmer's Learning Machine
Diffstat (limited to 'pkgs/applications/science/programming')
-rw-r--r-- | pkgs/applications/science/programming/plm/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/applications/science/programming/plm/default.nix b/pkgs/applications/science/programming/plm/default.nix new file mode 100644 index 000000000000..0e35a0b2264c --- /dev/null +++ b/pkgs/applications/science/programming/plm/default.nix @@ -0,0 +1,36 @@ +{stdenv, fetchurl, makeWrapper, jre, gcc, valgrind}: +# gcc and valgrind are not strict dependencies, they could be made +# optional. They are here because plm can only help you learn C if you +# have them installed. +stdenv.mkDerivation rec { + major = "2"; + minor = "5"; + version = "${major}-${minor}"; + name = "plm-${version}"; + + src = fetchurl { + url = "http://webloria.loria.fr/~quinson/Teaching/PLM/plm-${major}_${minor}.jar"; + sha256 = "0m17cxa3nxi2cbswqvlfzp0mlfi3wrkw8ry2xhkxy6aqzm2mlgcc"; + name = "${name}.jar"; + }; + + buildInputs = [ makeWrapper jre gcc valgrind ]; + + phases = [ "installPhase" ]; + + installPhase = '' + mkdir -p "$prefix/bin" + + makeWrapper ${jre}/bin/java $out/bin/plm \ + --add-flags "-jar $src" \ + --prefix PATH : "$PATH" + ''; + + meta = with stdenv.lib; { + description = "Free cross-platform programming exerciser"; + Homepage = http://webloria.loria.fr/~quinson/Teaching/PLM/; + license = licenses.gpl3; + maintainers = [ maintainers.DamienCassou ]; + platforms = stdenv.lib.platforms.all; + }; +} |