lol
1{
2 lib,
3 stdenv,
4 fetchurl,
5 makeWrapper,
6 jre,
7 nixosTests,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "ergo";
12 version = "6.0.1";
13
14 src = fetchurl {
15 url = "https://github.com/ergoplatform/ergo/releases/download/v${version}/ergo-${version}.jar";
16 sha256 = "sha256-ByvHXgXFdoHbc+lWEK82I/I50Q1aoe3SSI2JeaTjEC4=";
17 };
18
19 nativeBuildInputs = [ makeWrapper ];
20
21 dontUnpack = true;
22
23 installPhase = ''
24 makeWrapper ${jre}/bin/java $out/bin/ergo --add-flags "-jar $src"
25 '';
26
27 passthru.tests = { inherit (nixosTests) ergo; };
28
29 meta = with lib; {
30 description = "Open protocol that implements modern scientific ideas in the blockchain area";
31 homepage = "https://ergoplatform.org/en/";
32 sourceProvenance = with sourceTypes; [ binaryBytecode ];
33 license = licenses.cc0;
34 platforms = platforms.all;
35 maintainers = with maintainers; [ mmahut ];
36 mainProgram = "ergo";
37 };
38}