1 { lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind }:
2 # gcc and valgrind are not strict dependencies, they could be made
3 # optional. They are here because plm can only help you learn C if you
5 stdenv.mkDerivation rec {
10 url = "https://github.com/BuggleInc/PLM/releases/download/v${version}/plm-${version}.jar";
11 sha256 = "0i9ghx9pm3kpn9x9n1hl10zdr36v5mv3drx8lvhsqwhlsvz42p5i";
12 name = "${pname}-${version}.jar";
15 nativeBuildInputs = [ makeWrapper ];
16 buildInputs = [ jre gcc valgrind ];
23 mkdir -p "$prefix/bin"
25 makeWrapper ${jre}/bin/java $out/bin/plm \
26 --add-flags "-jar $src" \
27 --prefix PATH : "$PATH"
33 description = "Free cross-platform programming exerciser";
35 homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/";
36 license = licenses.gpl3;
37 sourceProvenance = with sourceTypes; [ binaryBytecode ];
39 platforms = lib.platforms.all;