2021-01-11 07:54:33 +00:00
|
|
|
{lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind}:
|
2015-02-13 14:58:29 +00:00
|
|
|
# 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}";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "plm";
|
2015-02-13 14:58:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://webloria.loria.fr/~quinson/Teaching/PLM/plm-${major}_${minor}.jar";
|
|
|
|
sha256 = "0m17cxa3nxi2cbswqvlfzp0mlfi3wrkw8ry2xhkxy6aqzm2mlgcc";
|
2019-08-15 13:41:18 +01:00
|
|
|
name = "${pname}-${version}.jar";
|
2015-02-13 14:58:29 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre gcc valgrind ];
|
2015-02-13 14:58:29 +00:00
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p "$prefix/bin"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/plm \
|
|
|
|
--add-flags "-jar $src" \
|
|
|
|
--prefix PATH : "$PATH"
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-02-13 14:58:29 +00:00
|
|
|
description = "Free cross-platform programming exerciser";
|
|
|
|
license = licenses.gpl3;
|
2017-01-31 10:00:14 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 13:21:58 +00:00
|
|
|
platforms = lib.platforms.all;
|
2018-09-01 23:47:13 +01:00
|
|
|
broken = true;
|
2015-02-13 14:58:29 +00:00
|
|
|
};
|
|
|
|
}
|