From 086f93432c138a987b72f66f84a8c885c0047622 Mon Sep 17 00:00:00 2001 From: Florian Sesser Date: Wed, 11 Dec 2024 19:49:35 +0000 Subject: [PATCH] Adapt to Tahoe-LAFS' new build system --- flake.nix | 1 - nix/tahoe-lafs.nix | 21 +++------------------ 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index 8a2d3c326..f1cbb459f 100644 --- a/flake.nix +++ b/flake.nix @@ -201,7 +201,6 @@ in writeScript "unit-tests" '' - ${python} setup.py update_version export TAHOE_LAFS_HYPOTHESIS_PROFILE=ci export PYTHONPATH=$PWD/src ${python} -m twisted.trial "$@" diff --git a/nix/tahoe-lafs.nix b/nix/tahoe-lafs.nix index 7d4a631af..f4734358a 100644 --- a/nix/tahoe-lafs.nix +++ b/nix/tahoe-lafs.nix @@ -9,6 +9,7 @@ in }: buildPythonPackage rec { inherit pname version; + pyproject = true; src = tahoe-lafs-src; propagatedBuildInputs = with pythonPackages; [ attrs @@ -22,6 +23,8 @@ buildPythonPackage rec { filelock foolscap future + hatchling + hatch-vcs klein magic-wormhole netifaces @@ -70,24 +73,6 @@ buildPythonPackage rec { }; }; - postPatch = - let - versionFileContents = version: '' - # This _version.py is generated by tahoe-lafs.nix. - # TODO: We can have more metadata after we switch to flakes. - # Then the `self` input will have a `sourceInfo` attribute telling - __pkgname__ = "tahoe-lafs" - real_version = "${version}" - full_version = "${version}" - branch = "" - verstr = "${version}" - __version__ = verstr - ''; - in - '' - cp ${builtins.toFile "_version.py" (versionFileContents version)} src/allmydata/_version.py - ''; - meta = with lib; { homepage = "https://tahoe-lafs.org/"; description = "secure, decentralized, fault-tolerant file store";