From 1f2c31b403b33c73f7fd941b41fda4ffe5572569 Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@private.storage>
Date: Thu, 6 Apr 2023 18:10:19 +0000
Subject: [PATCH] Update zkapauthorizer dependency

Switch to new zkapauthorizer that works with NixOS 22.11.
Since we're not a flake yet we have to add a few work-arounds
as well.
---
 nixos/pkgs/privatestorage/default.nix | 10 +++++++---
 nixos/pkgs/privatestorage/repo.json   |  8 ++++----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/nixos/pkgs/privatestorage/default.nix b/nixos/pkgs/privatestorage/default.nix
index 3bbbd3db..1904d06e 100644
--- a/nixos/pkgs/privatestorage/default.nix
+++ b/nixos/pkgs/privatestorage/default.nix
@@ -2,7 +2,11 @@
 let
   repo-data = lib.importJSON ./repo.json;
   repo = fetchFromGitHub (builtins.removeAttrs repo-data [ "branch" ]);
-  privatestorage = callPackage repo { python = "python39"; };
-in
-  privatestorage.privatestorage
+  zk = import repo;
+  zkapauthorizer = zk.outputs.packages.x86_64-linux.zkapauthorizer-python39-tahoe_1_18_0;
+  python = zkapauthorizer.passthru.python;
+in {
+  inherit python zkapauthorizer zk;
+  privatestorage = python.withPackages (ps: [ zkapauthorizer ] );
 
+}
diff --git a/nixos/pkgs/privatestorage/repo.json b/nixos/pkgs/privatestorage/repo.json
index 4113e150..beaf08b5 100644
--- a/nixos/pkgs/privatestorage/repo.json
+++ b/nixos/pkgs/privatestorage/repo.json
@@ -1,8 +1,8 @@
 {
-  "owner": "PrivateStorageio",
-  "branch": "main",
+  "owner": "hacklschorsch",
+  "branch": "un-mach",
   "repo": "ZKAPAuthorizer",
-  "rev": "744a063ab76a677b259aa9022711113ffbab2545",
+  "rev": "6ef2dcef4ac05ad7fcdd11a2ca3e7853eeff7091",
   "outputHashAlgo": "sha512",
-  "outputHash": "293j4469iy69d2hz3gwxwyj0flqb1cncl938s5w5jmfgbvkm1w0yfg1y06nx89zis1rvwqpcly3vxp94pz1dx28d74wiianqks11p54"
+  "outputHash": "11gq41gh8spix9a04a05vqn6fqrh521vmlk3ljigpfhwzrvld8hwf7wss064xxk3x7ib77v0bkg4hyrxqlwqd05zn0l4wmbwhhjhhc7"
 }
\ No newline at end of file
-- 
GitLab