From 96defb793f12d8270bc87dbf308400150781fe3c Mon Sep 17 00:00:00 2001 From: Szymon Scholz Date: Sat, 20 Apr 2024 19:12:29 +0200 Subject: [PATCH] peergos: 0.14.1 -> 0.17.0 --- pkgs/by-name/pe/peergos/package.nix | 55 +++++++++++++++++------------ 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/pe/peergos/package.nix b/pkgs/by-name/pe/peergos/package.nix index f91c8ea78618..dc142f44ce59 100644 --- a/pkgs/by-name/pe/peergos/package.nix +++ b/pkgs/by-name/pe/peergos/package.nix @@ -1,20 +1,19 @@ -{ lib -, stdenv -, fetchurl -, jre -, makeWrapper +{ + lib, + stdenv, + fetchurl, + jre, + makeWrapper, + nix-update-script, }: -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; + version = "0.17.0"; + src = fetchurl { + url = "https://github.com/Peergos/web-ui/releases/download/v${version}/Peergos.jar"; + hash = "sha256-sQPEKvtQDRQ4dF22tZjPhK7DLtDVAcudxoA4+GOeeZA="; + }; dontUnpack = true; dontBuild = true; @@ -24,21 +23,33 @@ stdenv.mkDerivation rec { 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" + install -D ${src} $out/share/java/peergos.jar + makeWrapper ${lib.getExe jre} $out/bin/peergos \ + --add-flags "-jar -Djava.library.path=native-lib $out/share/java/peergos.jar" runHook postInstall ''; - meta = with lib; { + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "^(v[0-9.]+)$" + ]; + }; + + meta = { + changelog = "https://github.com/Peergos/web-ui/releases/tag/v${version}"; description = "A p2p, secure file storage, social network and application protocol"; - mainProgram = "peergos"; + downloadPage = "https://github.com/Peergos/web-ui"; 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 ]; + license = [ + lib.licenses.agpl3Only + lib.licenses.gpl3Only + ]; + mainProgram = "peergos"; + maintainers = with lib.maintainers; [ raspher ]; + platforms = lib.platforms.all; + sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; }; }