2019-09-10 08:30:44 +02:00
|
|
|
{ stdenv, fetchFromGitHub, python3Packages }:
|
2018-06-02 11:01:01 +02:00
|
|
|
|
2019-09-10 08:30:44 +02:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2018-06-02 11:01:01 +02:00
|
|
|
pname = "zeronet";
|
2019-09-10 08:30:44 +02:00
|
|
|
version = "0.7.1";
|
2018-08-31 12:40:23 +02:00
|
|
|
format = "other";
|
2018-06-02 11:01:01 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "HelloZeroNet";
|
|
|
|
repo = "ZeroNet";
|
|
|
|
rev = "v${version}";
|
2019-09-10 08:30:44 +02:00
|
|
|
sha256 = "04prgicm0yjh2klcxdgwx1mvlsxxi2bdkzfcvysvixbgq20wjvdk";
|
2018-06-02 11:01:01 +02:00
|
|
|
};
|
|
|
|
|
2019-09-10 08:30:44 +02: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 11:01:01 +02: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 12:40:23 +02:00
|
|
|
--set PYTHONPATH "$PYTHONPATH" \
|
2019-09-10 08:30:44 +02:00
|
|
|
--set PATH ${python3Packages.python}/bin
|
2018-06-02 11:01:01 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Decentralized websites using Bitcoin crypto and BitTorrent network";
|
|
|
|
homepage = "https://zeronet.io/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|