plm: fix old link & deprecate phases

+10 -8
+10 -8
pkgs/applications/science/programming/plm/default.nix
··· 1 - {lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind}: 1 + { lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind }: 2 2 # gcc and valgrind are not strict dependencies, they could be made 3 3 # optional. They are here because plm can only help you learn C if you 4 4 # have them installed. 5 5 stdenv.mkDerivation rec { 6 - major = "2"; 7 - minor = "5"; 8 - version = "${major}-${minor}"; 9 6 pname = "plm"; 7 + version = "2.9.3"; 10 8 11 9 src = fetchurl { 12 - url = "http://webloria.loria.fr/~quinson/Teaching/PLM/plm-${major}_${minor}.jar"; 13 - sha256 = "0m17cxa3nxi2cbswqvlfzp0mlfi3wrkw8ry2xhkxy6aqzm2mlgcc"; 10 + url = "https://github.com/BuggleInc/PLM/releases/download/v${version}/plm-${version}.jar"; 11 + sha256 = "0i9ghx9pm3kpn9x9n1hl10zdr36v5mv3drx8lvhsqwhlsvz42p5i"; 14 12 name = "${pname}-${version}.jar"; 15 13 }; 16 14 17 15 nativeBuildInputs = [ makeWrapper ]; 18 16 buildInputs = [ jre gcc valgrind ]; 19 17 20 - phases = [ "installPhase" ]; 18 + dontUnpack = true; 21 19 22 20 installPhase = '' 21 + runHook preInstall 22 + 23 23 mkdir -p "$prefix/bin" 24 24 25 25 makeWrapper ${jre}/bin/java $out/bin/plm \ 26 26 --add-flags "-jar $src" \ 27 27 --prefix PATH : "$PATH" 28 + 29 + runHook postInstall 28 30 ''; 29 31 30 32 meta = with lib; { 31 33 description = "Free cross-platform programming exerciser"; 34 + homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/"; 32 35 license = licenses.gpl3; 33 36 maintainers = [ ]; 34 37 platforms = lib.platforms.all; 35 - broken = true; 36 38 }; 37 39 }