{ description = "I2P anonymous network router — Python implementation"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; python = pkgs.python3; i2p-python = python.pkgs.buildPythonApplication { pname = "i2p-python"; version = "0.1.0"; pyproject = true; src = ./.; build-system = [ python.pkgs.hatchling ]; dependencies = with python.pkgs; [ cryptography pynacl flask ]; nativeCheckInputs = with python.pkgs; [ pytestCheckHook pytest-asyncio pytest-timeout ]; # Skip tests that need network or containers disabledTestPaths = [ "tests/test_integration" ]; pythonImportsCheck = [ "i2p_router" "i2p_sam" "i2p_data" "i2p_crypto" "i2p_transport" "i2p_apps" ]; meta = with pkgs.lib; { description = "Complete I2P anonymous network implementation in Python"; license = licenses.mit; mainProgram = "i2p-router"; }; }; in { packages = { default = i2p-python; inherit i2p-python; }; devShells.default = pkgs.mkShell { inputsFrom = [ i2p-python ]; packages = with python.pkgs; [ pytest pytest-cov pytest-asyncio pytest-timeout ]; }; } ) // { nixosModules.default = import ./nix/module.nix self; }; }