Forking what is left of ZeroNet and hopefully adding an AT Proto Frontend/Proxy
1{
2 inputs = {
3 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4 nixpkgs-legacy.url = "github:NixOS/nixpkgs/nixos-23.11";
5 utils.url = "github:numtide/flake-utils";
6 };
7
8 outputs =
9 {
10 nixpkgs,
11 nixpkgs-legacy,
12 utils,
13 ...
14 }:
15 utils.lib.eachDefaultSystem (
16 system:
17 let
18 pkgs = import nixpkgs { inherit system; };
19 pkgs-old = import nixpkgs-legacy { inherit system; };
20
21 # Define Python environment with required packages
22 pythonEnv = pkgs-old.python310.withPackages (
23 ps: with ps; [
24 gevent
25 greenlet
26 msgpack
27 base58
28 merkletools
29 rsa
30 pysocks
31 pyasn1
32 websocket-client
33 gevent-websocket
34 coincurve
35 maxminddb
36 ]
37 );
38
39 libraries = with pkgs; [
40 stdenv.cc.cc
41 glib
42 dbus
43 curl
44 openssl
45 ];
46 in
47 {
48 devShells.default = pkgs.mkShell {
49 nativeBuildInputs = [
50 pkgs.pkg-config
51 pkgs.openssl
52 ];
53 buildInputs = [
54 pythonEnv
55 pkgs.tor
56 ]
57 ++ libraries;
58
59 shellHook = ''
60 export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH"
61 echo "❄️ ZeroNet dev environment loaded (Python 3.11)!"
62 echo "To start ZeroNet, run: python zeronet.py"
63 '';
64 };
65 }
66 );
67}