From 7abe9d11615af5ce0266e56aa13a162272c6cb16 Mon Sep 17 00:00:00 2001 From: Martin Joerg Date: Sun, 14 Jul 2024 09:54:25 +0000 Subject: [PATCH] tahoe-lafs: use Python 3.11 Tahoe-LAFS unstable-2021-07-09 is incompatible with Python 3.12, and uses eliot in a way incompatible after version 1.14.0. These versions should be unpinned, when updating Tahoe-LAFS to a more recent version.lafs --- .../networking/p2p/tahoe-lafs/default.nix | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix index abeabc337a15..e9de0da071c6 100644 --- a/pkgs/tools/networking/p2p/tahoe-lafs/default.nix +++ b/pkgs/tools/networking/p2p/tahoe-lafs/default.nix @@ -1,10 +1,36 @@ -{ lib, nettools, python3Packages, texinfo, fetchFromGitHub }: +{ lib, nettools, python311, texinfo, fetchFromGitHub }: # FAILURES: The "running build_ext" phase fails to compile Twisted # plugins, because it tries to write them into Twisted's (immutable) # store path. The problem appears to be non-fatal, but there's probably # some loss of functionality because of it. +let + # Tahoe-LAFS unstable-2021-07-09 is incompatible with Python 3.12, and + # uses eliot in a way incompatible after version 1.14.0. + # These versions should be unpinned, when updating Tahoe-LAFS to a more recent version. + python = python311.override { + packageOverrides = self: super: { + eliot = super.eliot.overridePythonAttrs (oldAttrs: rec { + version = "1.14.0"; + + src = fetchFromGitHub { + owner = "itamarst"; + repo = "eliot"; + rev = "refs/tags/${version}"; + hash = "sha256-1QE/s8P2g7DGIcuT+/AikAaWMTafNWn4BRZqpBn5ghk="; + }; + + disabledTests = [ + "test_default" + "test_large_numpy_array" + "test_numpy" + ]; + }); + }; + }; + python3Packages = python.pkgs; +in python3Packages.buildPythonApplication rec { pname = "tahoe-lafs"; version = "unstable-2021-07-09";