Unverified Commit 7b773b5f authored by Robert Schütz's avatar Robert Schütz Committed by GitHub
Browse files

Merge pull request #282470 from raspher/peergos

peergos: init at 0.14.1
parents d6ed78b5 bdb4a037
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -15775,6 +15775,12 @@
    githubId = 1891350;
    name = "Michael Raskin";
  };
  raspher = {
    email = "raspher@protonmail.com";
    github = "raspher";
    githubId = 23345803;
    name = "Szymon Scholz";
  };
  ratcornu = {
    email = "ratcornu@skaven.org";
    github = "RatCornu";
+43 −0
Original line number Diff line number Diff line
{ lib
, stdenv
, fetchurl
, jre
, makeWrapper
}:

let
  version = "0.14.1";
  peergos = fetchurl {
    url = "https://github.com/Peergos/web-ui/releases/download/v${version}/Peergos.jar";
    hash = "sha256-oCsUuFxTAL0vAabGggGhZHaF40A5TLfkT15HYPiKHlU=";
  };
in
stdenv.mkDerivation rec {
  pname = "peergos";
  inherit version;

  dontUnpack = true;
  dontBuild = true;

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall

    install -D ${peergos} $out/share/java/peergos.jar
    makeWrapper ${lib.getExe jre} $out/bin/${pname} \
      --add-flags "-jar -Djava.library.path=native-lib $out/share/java/${pname}.jar"

    runHook postInstall
  '';

  meta = with lib; {
    description = "A p2p, secure file storage, social network and application protocol";
    homepage = "https://peergos.org/";
    # peergos have agpt3 license, peergos-web-ui have gpl3, both are used
    license = [ licenses.agpl3Only licenses.gpl3Only ];
    platforms = platforms.all;
    maintainers = with maintainers; [ raspher ];
    sourceProvenance = with sourceTypes; [ binaryBytecode ];
  };
}