2015-02-13 14:58:29 +00:00
|
|
|
{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";
|
2017-12-05 22:20:11 +00:00
|
|
|
homepage = http://webloria.loria.fr/~quinson/Teaching/PLM/;
|
2015-02-13 14:58:29 +00:00
|
|
|
license = licenses.gpl3;
|
2017-01-31 10:00:14 +00:00
|
|
|
maintainers = [ ];
|
2015-02-13 14:58:29 +00:00
|
|
|
platforms = stdenv.lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|