nixpkgs/pkgs/by-name/pe/peergos/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.4 KiB
Nix
Raw Normal View History

2024-04-20 17:12:29 +00:00
{
lib,
stdenv,
fetchurl,
jre,
makeWrapper,
nix-update-script,
2024-01-21 02:23:47 +00:00
}:
stdenv.mkDerivation rec {
pname = "peergos";
2024-05-27 18:53:26 +00:00
version = "0.18.0";
2024-04-20 17:12:29 +00:00
src = fetchurl {
url = "https://github.com/Peergos/web-ui/releases/download/v${version}/Peergos.jar";
2024-05-27 18:53:26 +00:00
hash = "sha256-qscNGuptkRd7bQhIq51bJ/cH2Gzn60lB4IUT9RK6eIo=";
2024-04-20 17:12:29 +00:00
};
2024-01-21 02:23:47 +00:00
dontUnpack = true;
dontBuild = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
2024-04-20 17:12:29 +00:00
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"
2024-01-21 02:23:47 +00:00
runHook postInstall
'';
2024-04-20 17:12:29 +00:00
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^(v[0-9.]+)$"
];
};
meta = {
changelog = "https://github.com/Peergos/web-ui/releases/tag/v${version}";
2024-01-21 02:23:47 +00:00
description = "A p2p, secure file storage, social network and application protocol";
2024-04-20 17:12:29 +00:00
downloadPage = "https://github.com/Peergos/web-ui";
2024-01-21 02:23:47 +00:00
homepage = "https://peergos.org/";
# peergos have agpt3 license, peergos-web-ui have gpl3, both are used
2024-04-20 17:12:29 +00:00
license = [
lib.licenses.agpl3Only
lib.licenses.gpl3Only
];
mainProgram = "peergos";
maintainers = with lib.maintainers; [ raspher ];
platforms = lib.platforms.all;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
2024-01-21 02:23:47 +00:00
};
}