From 24394b5ec0c1a4c10ab577e54df7bf440d933be9 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Fri, 20 Sep 2019 13:31:38 -0400
Subject: [PATCH] ZKAPAuthorizer can now be responsible for all of these.

---
 nixos/pkgs/autobahn.nix             | 35 --------------
 nixos/pkgs/cryptography.nix         | 75 -----------------------------
 nixos/pkgs/cryptography_vectors.nix | 23 ---------
 nixos/pkgs/eliot.nix                | 27 -----------
 nixos/pkgs/tahoe-lafs.nix           |  5 --
 5 files changed, 165 deletions(-)
 delete mode 100644 nixos/pkgs/autobahn.nix
 delete mode 100644 nixos/pkgs/cryptography.nix
 delete mode 100644 nixos/pkgs/cryptography_vectors.nix
 delete mode 100644 nixos/pkgs/eliot.nix
 delete mode 100644 nixos/pkgs/tahoe-lafs.nix

diff --git a/nixos/pkgs/autobahn.nix b/nixos/pkgs/autobahn.nix
deleted file mode 100644
index 3cc1df21..00000000
--- a/nixos/pkgs/autobahn.nix
+++ /dev/null
@@ -1,35 +0,0 @@
-{ lib, buildPythonPackage, fetchFromGitHub, isPy3k,
-  six, txaio, twisted, zope_interface, cffi, trollius, futures, cryptography,
-  mock, pytest
-}:
-buildPythonPackage rec {
-  pname = "autobahn";
-  version = "19.7.1";
-
-  src = fetchFromGitHub {
-    owner = "crossbario";
-    repo = "autobahn-python";
-    rev = "v${version}";
-    sha256 = "1gl2m18s77hlpiglh44plv3k6b965n66ylnxbzgvzcdl9jf3l3q3";
-  };
-
-  propagatedBuildInputs = [ six txaio twisted zope_interface cffi cryptography ] ++
-    (lib.optionals (!isPy3k) [ trollius futures ]);
-
-  checkInputs = [ mock pytest ];
-  checkPhase = ''
-    runHook preCheck
-    USE_TWISTED=true py.test $out
-    runHook postCheck
-  '';
-
-  # XXX Fails for some reason I don't understand.
-  doCheck = false;
-
-  meta = with lib; {
-    description = "WebSocket and WAMP in Python for Twisted and asyncio.";
-    homepage    = "https://crossbar.io/autobahn";
-    license     = licenses.mit;
-    maintainers = with maintainers; [ nand0p ];
-  };
-}
diff --git a/nixos/pkgs/cryptography.nix b/nixos/pkgs/cryptography.nix
deleted file mode 100644
index bfa6d302..00000000
--- a/nixos/pkgs/cryptography.nix
+++ /dev/null
@@ -1,75 +0,0 @@
-{ stdenv
-, buildPythonPackage
-, fetchFromGitHub
-, openssl
-, cryptography_vectors
-, darwin
-, asn1crypto
-, packaging
-, six
-, pythonOlder
-, enum34
-, ipaddress
-, isPyPy
-, cffi
-, pytest
-, pretend
-, iso8601
-, pytz
-, hypothesis
-}:
-
-buildPythonPackage rec {
-  pname = "cryptography";
-  version = "2.7"; # Also update the hash in vectors.nix
-
-  src = fetchFromGitHub {
-    owner = "pyca";
-    repo = "cryptography";
-    rev = "2.7";
-    sha256 = "145byri5c3b8m6dbhwb6yxrv9jrr652l3z1w16mz205z8dz38qja";
-  };
-
-  outputs = [ "out" "dev" ];
-
-  buildInputs = [ openssl ]
-             ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
-  propagatedBuildInputs = [
-    asn1crypto
-    packaging
-    six
-  ] ++ stdenv.lib.optional (pythonOlder "3.4") enum34
-  ++ stdenv.lib.optional (pythonOlder "3.3") ipaddress
-  ++ stdenv.lib.optional (!isPyPy) cffi;
-
-  checkInputs = [
-    cryptography_vectors
-    hypothesis
-    iso8601
-    pretend
-    pytest
-    pytz
-  ];
-
-  checkPhase = ''
-    py.test --disable-pytest-warnings tests
-  '';
-
-  # IOKit's dependencies are inconsistent between OSX versions, so this is the best we
-  # can do until nix 1.11's release
-  __impureHostDeps = [ "/usr/lib" ];
-
-  meta = with stdenv.lib; {
-    description = "A package which provides cryptographic recipes and primitives";
-    longDescription = ''
-      Cryptography includes both high level recipes and low level interfaces to
-      common cryptographic algorithms such as symmetric ciphers, message
-      digests, and key derivation functions.
-      Our goal is for it to be your "cryptographic standard library". It
-      supports Python 2.7, Python 3.4+, and PyPy 5.3+.
-    '';
-    homepage = https://github.com/pyca/cryptography;
-    license = with licenses; [ asl20 bsd3 psfl ];
-    maintainers = with maintainers; [ primeos ];
-  };
-}
diff --git a/nixos/pkgs/cryptography_vectors.nix b/nixos/pkgs/cryptography_vectors.nix
deleted file mode 100644
index ea24ed90..00000000
--- a/nixos/pkgs/cryptography_vectors.nix
+++ /dev/null
@@ -1,23 +0,0 @@
-{ buildPythonPackage, fetchPypi, lib, cryptography }:
-
-buildPythonPackage rec {
-  pname = "cryptography_vectors";
-  # The test vectors must have the same version as the cryptography package:
-  version = cryptography.version;
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "1g38zw90510azyfrj6mxbslx2gp9yrnv5dac0w2819k9ssdznbgi";
-  };
-
-  # No tests included
-  doCheck = false;
-
-  meta = with lib; {
-    description = "Test vectors for the cryptography package";
-    homepage = https://cryptography.io/en/latest/development/test-vectors/;
-    # Source: https://github.com/pyca/cryptography/tree/master/vectors;
-    license = with licenses; [ asl20 bsd3 ];
-    maintainers = with maintainers; [ primeos ];
-  };
-}
diff --git a/nixos/pkgs/eliot.nix b/nixos/pkgs/eliot.nix
deleted file mode 100644
index f6d6b306..00000000
--- a/nixos/pkgs/eliot.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ lib, buildPythonPackage, fetchPypi, zope_interface, pyrsistent, boltons
-, hypothesis, testtools, pytest }:
-buildPythonPackage rec {
-  pname = "eliot";
-  version = "1.7.0";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "0ylyycf717s5qsrx8b9n6m38vyj2k8328lfhn8y6r31824991wv8";
-  };
-
-  postPatch = ''
-    substituteInPlace setup.py \
-      --replace "boltons >= 19.0.1" boltons
-    # depends on eliot.prettyprint._main which we don't have here.
-    rm eliot/tests/test_prettyprint.py
-  '';
-
-  checkInputs = [ testtools pytest hypothesis ];
-  propagatedBuildInputs = [ zope_interface pyrsistent boltons ];
-
-  meta = with lib; {
-    homepage = https://github.com/itamarst/eliot/;
-    description = "Logging library that tells you why it happened";
-    license = licenses.asl20;
-  };
-}
diff --git a/nixos/pkgs/tahoe-lafs.nix b/nixos/pkgs/tahoe-lafs.nix
deleted file mode 100644
index f6d85461..00000000
--- a/nixos/pkgs/tahoe-lafs.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ fetchFromGitHub, python27Packages }:
-let
-  zkapauthorizer = import ./zkapauthorizer-repo.nix { inherit fetchFromGitHub; };
-in
-  python27Packages.callPackage "${zkapauthorizer}/tahoe-lafs.nix" { }
-- 
GitLab