nixpkgs/pkgs/applications/networking/p2p/zeronet-conservancy/default.nix

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

62 lines
1.7 KiB
Nix
Raw Normal View History

2022-05-21 18:19:15 +03:00
{ lib
, fetchFromGitHub
, python3Packages
2022-06-10 15:54:16 +03:00
, nixosTests
2022-05-21 18:19:15 +03:00
}:
python3Packages.buildPythonApplication rec {
pname = "zeronet-conservancy";
version = "0.7.10";
2022-05-21 18:19:15 +03:00
format = "other";
src = fetchFromGitHub {
owner = "zeronet-conservancy";
repo = "zeronet-conservancy";
rev = "v${version}";
sha256 = "sha256-ZQYdK0B0z0cXTx7ujFngW3wSa/j8sEuwHB+BC5Xqq8o=";
2022-05-21 18:19:15 +03:00
};
propagatedBuildInputs = with python3Packages; [
gevent msgpack base58 merkletools rsa pysocks pyasn1 websocket-client
2022-08-11 23:22:56 +03:00
gevent-websocket rencode bitcoinlib maxminddb pyopenssl rich defusedxml
pyaes coincurve
2022-05-21 18:19:15 +03:00
];
buildPhase = ''
runHook preBuild
${python3Packages.python.pythonOnBuildForHost.interpreter} -O -m compileall .
runHook postBuild
2022-05-21 18:19:15 +03:00
'';
installPhase = ''
runHook preInstall
2022-05-21 18:19:15 +03:00
mkdir -p $out/share
cp -r plugins src *.py $out/share/
runHook postInstall
2022-05-21 18:19:15 +03:00
'';
postFixup = ''
makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \
--set PYTHONPATH "$PYTHONPATH" \
--set PATH ${python3Packages.python}/bin
'';
2022-06-10 15:54:16 +03:00
passthru.tests = {
nixos-test = nixosTests.zeronet-conservancy;
};
2022-05-21 18:19:15 +03:00
meta = with lib; {
description = "A fork/continuation of the ZeroNet project";
mainProgram = "zeronet";
2022-05-21 18:19:15 +03:00
longDescription = ''
zeronet-conservancy is a fork/continuation of ZeroNet project (that has
been abandoned by its creator) that is dedicated to sustaining existing
p2p network and developing its values of decentralization and freedom,
while gradually switching to a better designed network.
'';
homepage = "https://github.com/zeronet-conservancy/zeronet-conservancy";
license = licenses.gpl3Only;
maintainers = with maintainers; [ fgaz ];
};
}