2021-08-08 20:39:12 +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 {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "plm";
|
2021-08-08 20:39:12 +00:00
|
|
|
version = "2.9.3";
|
2015-02-13 14:58:29 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-08 20:39:12 +00:00
|
|
|
url = "https://github.com/BuggleInc/PLM/releases/download/v${version}/plm-${version}.jar";
|
|
|
|
sha256 = "0i9ghx9pm3kpn9x9n1hl10zdr36v5mv3drx8lvhsqwhlsvz42p5i";
|
2019-08-15 12:41:18 +00: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
|
|
|
|
2021-08-08 20:39:12 +00:00
|
|
|
dontUnpack = true;
|
2015-02-13 14:58:29 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-08 20:39:12 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2015-02-13 14:58:29 +00:00
|
|
|
mkdir -p "$prefix/bin"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/plm \
|
|
|
|
--add-flags "-jar $src" \
|
|
|
|
--prefix PATH : "$PATH"
|
2021-08-08 20:39:12 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2015-02-13 14:58:29 +00:00
|
|
|
'';
|
|
|
|
|
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";
|
2021-08-08 20:39:12 +00:00
|
|
|
homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/";
|
2015-02-13 14:58:29 +00:00
|
|
|
license = licenses.gpl3;
|
2017-01-31 10:00:14 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 13:21:58 +00:00
|
|
|
platforms = lib.platforms.all;
|
2015-02-13 14:58:29 +00:00
|
|
|
};
|
|
|
|
}
|