nixpkgs/pkgs/applications/science/programming/plm/default.nix

40 lines
1 KiB
Nix
Raw Normal View History

2021-08-08 20:39:12 +00:00
{ lib, stdenv, fetchurl, makeWrapper, jre, gcc, valgrind }:
# 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-08 20:39:12 +00:00
version = "2.9.3";
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";
name = "${pname}-${version}.jar";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre gcc valgrind ];
2021-08-08 20:39:12 +00:00
dontUnpack = true;
installPhase = ''
2021-08-08 20:39:12 +00:00
runHook preInstall
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
'';
meta = with lib; {
description = "Free cross-platform programming exerciser";
2021-08-08 20:39:12 +00:00
homepage = "http://people.irisa.fr/Martin.Quinson/Teaching/PLM/";
license = licenses.gpl3;
2017-01-31 10:00:14 +00:00
maintainers = [ ];
2021-01-15 13:21:58 +00:00
platforms = lib.platforms.all;
};
}