Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchurl, 4 stdenvNoCC, 5 makeWrapper, 6 jre, 7}: 8 9stdenvNoCC.mkDerivation rec { 10 pname = "flix"; 11 version = "0.60.0"; 12 13 src = fetchurl { 14 url = "https://github.com/flix/flix/releases/download/v${version}/flix.jar"; 15 sha256 = "sha256-mSCxB8m060K/F8b1VhQbTMjtv//feS3pobxShFBc08U="; 16 }; 17 18 dontUnpack = true; 19 20 nativeBuildInputs = [ makeWrapper ]; 21 22 installPhase = '' 23 runHook preInstall 24 25 export JAR=$out/share/java/flix/flix.jar 26 install -D $src $JAR 27 makeWrapper ${jre}/bin/java $out/bin/flix \ 28 --add-flags "-jar $JAR" 29 30 runHook postInstall 31 ''; 32 33 meta = with lib; { 34 description = "Flix Programming Language"; 35 mainProgram = "flix"; 36 homepage = "https://github.com/flix/flix"; 37 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 38 license = licenses.asl20; 39 maintainers = with maintainers; [ athas ]; 40 inherit (jre.meta) platforms; 41 }; 42}