From d52bc170a8dc191f61d5ed1a116e76de8c0e0247 Mon Sep 17 00:00:00 2001
From: Tom Prince <tom.prince@private.storage>
Date: Mon, 11 Oct 2021 10:28:18 -0600
Subject: [PATCH] Use tahoe-pin.

---
 new.nix               | 10 +++-------
 nix/sources.json      | 12 ++++++++++++
 requirements/base.in  |  2 +-
 requirements/base.txt |  2 ++
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/new.nix b/new.nix
index ac67bd9..cc42aca 100644
--- a/new.nix
+++ b/new.nix
@@ -4,11 +4,12 @@ in
 { pkgs ? import sources.release2015 {}
 , pypiData ? sources.pypi-deps-db
 , mach-nix ? import sources.mach-nix { inherit pkgs pypiData; }
+, tahoe-lafs-repo ? sources.tahoe-lafs
 }:
   let
     providers = {
       _default = "sdist,nixpkgs,wheel";
-      tahoe-lafs = "nixpkgs,sdist";
+      tahoe-lafs = "nixpkgs";
       # not packaged in nixpkgs at all, we can use the binary wheel from
       # pypi though.
       python-challenge-bypass-ristretto = "wheel";
@@ -44,12 +45,7 @@ in
         __version__ = verstr
         EOF
       '';
-      src = pkgs.fetchFromGitHub {
-        owner = "fenn-cs";
-        repo = "tahoe-lafs";
-        rev = "f6a96ae3976ee21ad0376f7b6a22fc3d12110dce";
-        sha256 = "ZN2V5vH+VqPaBmQXXqyH+vUiqW1YNhz+7LsiNNhA/4g=";
-      };
+      src = tahoe-lafs-repo;
     };
   in
     mach-nix.buildPythonApplication rec {
diff --git a/nix/sources.json b/nix/sources.json
index a4f9875..28cff84 100644
--- a/nix/sources.json
+++ b/nix/sources.json
@@ -40,5 +40,17 @@
         "type": "tarball",
         "url": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3740.ce7a1190a0f/nixexprs.tar.xz",
         "url_template": "https://releases.nixos.org/nixos/21.05/nixos-21.05.3740.ce7a1190a0f/nixexprs.tar.xz"
+    },
+    "tahoe-lafs": {
+        "branch": "master",
+        "description": "The Tahoe-LAFS decentralized secure filesystem.",
+        "homepage": "https://tahoe-lafs.org/",
+        "owner": "tahoe-lafs",
+        "repo": "tahoe-lafs",
+        "rev": "be5f5839b3484c278a051f375d18952e23940677",
+        "sha256": "1f6g1ikglz6rj8wada1kzi2ybyvrpr5a6gdi2mjvvczxhpixa96s",
+        "type": "tarball",
+        "url": "https://github.com/tahoe-lafs/tahoe-lafs/archive/be5f5839b3484c278a051f375d18952e23940677.tar.gz",
+        "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
     }
 }
diff --git a/requirements/base.in b/requirements/base.in
index 0c5e30c..837f771 100644
--- a/requirements/base.in
+++ b/requirements/base.in
@@ -3,5 +3,5 @@ zope.interface
 eliot
 aniso8601
 python-challenge-bypass-ristretto
-https://github.com/fenn-cs/tahoe-lafs/archive/f6a96ae3976ee21ad0376f7b6a22fc3d12110dce.tar.gz
+https://github.com/tahoe-lafs/tahoe-lafs/archive/be5f5839b3484c278a051f375d18952e23940677.tar.gz
 treq
diff --git a/requirements/base.txt b/requirements/base.txt
index 798d5ed..f85ab0f 100644
--- a/requirements/base.txt
+++ b/requirements/base.txt
@@ -45,6 +45,8 @@ chardet==4.0.0
     # via requests
 click==7.1.2
     # via magic-wormhole
+collections-extended==1.0.3
+    # via tahoe-lafs
 configparser==4.0.2
     # via tahoe-lafs
 constantly==15.1.0
-- 
GitLab