plm: fix old link & deprecate phases
This commit is contained in:
parent
5f0ab7555d
commit
d62ab96698
|
@ -1,37 +1,39 @@
|
||||||
{lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind}:
|
{ lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind }:
|
||||||
# gcc and valgrind are not strict dependencies, they could be made
|
# 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
|
# optional. They are here because plm can only help you learn C if you
|
||||||
# have them installed.
|
# have them installed.
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
major = "2";
|
|
||||||
minor = "5";
|
|
||||||
version = "${major}-${minor}";
|
|
||||||
pname = "plm";
|
pname = "plm";
|
||||||
|
version = "2.9.3";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://webloria.loria.fr/~quinson/Teaching/PLM/plm-${major}_${minor}.jar";
|
url = "https://github.com/BuggleInc/PLM/releases/download/v${version}/plm-${version}.jar";
|
||||||
sha256 = "0m17cxa3nxi2cbswqvlfzp0mlfi3wrkw8ry2xhkxy6aqzm2mlgcc";
|
sha256 = "0i9ghx9pm3kpn9x9n1hl10zdr36v5mv3drx8lvhsqwhlsvz42p5i";
|
||||||
name = "${pname}-${version}.jar";
|
name = "${pname}-${version}.jar";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
buildInputs = [ jre gcc valgrind ];
|
buildInputs = [ jre gcc valgrind ];
|
||||||
|
|
||||||
phases = [ "installPhase" ];
|
dontUnpack = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
|
|
||||||
mkdir -p "$prefix/bin"
|
mkdir -p "$prefix/bin"
|
||||||
|
|
||||||
makeWrapper ${jre}/bin/java $out/bin/plm \
|
makeWrapper ${jre}/bin/java $out/bin/plm \
|
||||||
--add-flags "-jar $src" \
|
--add-flags "-jar $src" \
|
||||||
--prefix PATH : "$PATH"
|
--prefix PATH : "$PATH"
|
||||||
|
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Free cross-platform programming exerciser";
|
description = "Free cross-platform programming exerciser";
|
||||||
|
homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/";
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
maintainers = [ ];
|
maintainers = [ ];
|
||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
broken = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue