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

42 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, python3Packages }:
2018-06-02 09:01:01 +00:00
2019-09-10 06:30:44 +00:00
python3Packages.buildPythonApplication rec {
2018-06-02 09:01:01 +00:00
pname = "zeronet";
2019-09-10 06:30:44 +00:00
version = "0.7.1";
2018-08-31 10:40:23 +00:00
format = "other";
2018-06-02 09:01:01 +00:00
src = fetchFromGitHub {
owner = "HelloZeroNet";
repo = "ZeroNet";
rev = "v${version}";
2019-09-10 06:30:44 +00:00
sha256 = "04prgicm0yjh2klcxdgwx1mvlsxxi2bdkzfcvysvixbgq20wjvdk";
2018-06-02 09:01:01 +00:00
};
2019-09-10 06:30:44 +00:00
propagatedBuildInputs = with python3Packages; [
gevent msgpack base58 merkletools rsa pysocks pyasn1 websocket_client
gevent-websocket rencode bitcoinlib maxminddb pyopenssl
];
buildPhase = ''
${python3Packages.python.interpreter} -O -m compileall .
'';
2018-06-02 09:01:01 +00:00
installPhase = ''
mkdir -p $out/share
cp -r plugins src tools *.py $out/share/
'';
postFixup = ''
makeWrapper "$out/share/zeronet.py" "$out/bin/zeronet" \
2018-08-31 10:40:23 +00:00
--set PYTHONPATH "$PYTHONPATH" \
2019-09-10 06:30:44 +00:00
--set PATH ${python3Packages.python}/bin
2018-06-02 09:01:01 +00:00
'';
meta = with lib; {
2018-06-02 09:01:01 +00:00
description = "Decentralized websites using Bitcoin crypto and BitTorrent network";
homepage = "https://zeronet.io/";
license = licenses.gpl2;
maintainers = with maintainers; [ fgaz ];
};
}