2021-08-10 14:31:46 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind }:
|
2020-04-24 23:36:52 +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 {
|
|
|
|
pname = "plm";
|
2021-08-10 14:31:46 +00:00
|
|
|
version = "2.9.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-10 14:31:46 +00:00
|
|
|
url = "https://github.com/BuggleInc/PLM/releases/download/v${version}/plm-${version}.jar";
|
|
|
|
sha256 = "0i9ghx9pm3kpn9x9n1hl10zdr36v5mv3drx8lvhsqwhlsvz42p5i";
|
2020-04-24 23:36:52 +00:00
|
|
|
name = "${pname}-${version}.jar";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ jre gcc valgrind ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-10 14:31:46 +00:00
|
|
|
dontUnpack = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-10 14:31:46 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p "$prefix/bin"
|
|
|
|
|
|
|
|
makeWrapper ${jre}/bin/java $out/bin/plm \
|
|
|
|
--add-flags "-jar $src" \
|
|
|
|
--prefix PATH : "$PATH"
|
2021-08-10 14:31:46 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Free cross-platform programming exerciser";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "plm";
|
2021-08-10 14:31:46 +00:00
|
|
|
homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ ];
|
2021-01-17 00:15:33 +00:00
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|