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