Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, fetchurl, stdenvNoCC, makeWrapper, jre }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "rars";
5 version = "1.6";
6
7 src = fetchurl {
8 url = "https://github.com/TheThirdOne/rars/releases/download/v${version}/rars1_6.jar";
9 hash = "sha256-eA9zDrRXsbpgnpaKzMLIt32PksPZ2/MMx/2zz7FOjCQ=";
10 };
11
12 dontUnpack = true;
13
14 nativeBuildInputs = [ makeWrapper ];
15
16 installPhase = ''
17 runHook preInstall
18 export JAR=$out/share/java/${pname}/${pname}.jar
19 install -D $src $JAR
20 makeWrapper ${jre}/bin/java $out/bin/${pname} \
21 --add-flags "-jar $JAR"
22 runHook postInstall
23 '';
24
25 meta = with lib; {
26 description = "RISC-V Assembler and Runtime Simulator";
27 mainProgram = "rars";
28 homepage = "https://github.com/TheThirdOne/rars";
29 sourceProvenance = with sourceTypes; [ binaryBytecode ];
30 license = licenses.mit;
31 maintainers = with maintainers; [ athas ];
32 platforms = platforms.all;
33 };
34}