at v192 36 lines 1.1 kB view raw
1{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 4# have them installed. 5stdenv.mkDerivation rec { 6 major = "2"; 7 minor = "5"; 8 version = "${major}-${minor}"; 9 name = "plm-${version}"; 10 11 src = fetchurl { 12 url = "http://webloria.loria.fr/~quinson/Teaching/PLM/plm-${major}_${minor}.jar"; 13 sha256 = "0m17cxa3nxi2cbswqvlfzp0mlfi3wrkw8ry2xhkxy6aqzm2mlgcc"; 14 name = "${name}.jar"; 15 }; 16 17 buildInputs = [ makeWrapper jre gcc valgrind ]; 18 19 phases = [ "installPhase" ]; 20 21 installPhase = '' 22 mkdir -p "$prefix/bin" 23 24 makeWrapper ${jre}/bin/java $out/bin/plm \ 25 --add-flags "-jar $src" \ 26 --prefix PATH : "$PATH" 27 ''; 28 29 meta = with stdenv.lib; { 30 description = "Free cross-platform programming exerciser"; 31 Homepage = http://webloria.loria.fr/~quinson/Teaching/PLM/; 32 license = licenses.gpl3; 33 maintainers = [ maintainers.DamienCassou ]; 34 platforms = stdenv.lib.platforms.all; 35 }; 36}