diff --git a/default.nix b/default.nix deleted file mode 100644 index 6d24dab31df44598c1baff1feefa9e2e836cf724..0000000000000000000000000000000000000000 --- a/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ pkgs ? import <nixpkgs> { } -, hypothesisProfile ? null -, collectCoverage ? false -, testSuite ? null -, trialArgs ? null -, tahoe-lafs ? "1.14.0" -}: -let - tahoe-packages = { - "1.14.0" = pkgs.python2Packages.tahoe-lafs-1_14; - "1.16.0rc1" = pkgs.python2Packages.callPackage ./nix/tahoe-lafs-1_16.nix { }; - }; - tahoe-lafs' = builtins.getAttr tahoe-lafs tahoe-packages; - - pkgs' = pkgs.extend (import ./overlays.nix); - callPackage = pkgs'.python27Packages.callPackage; -in -callPackage ./zkapauthorizer.nix { - challenge-bypass-ristretto = callPackage ./python-challenge-bypass-ristretto.nix { }; - inherit hypothesisProfile collectCoverage testSuite trialArgs; - tahoe-lafs = tahoe-lafs'; -} diff --git a/nix/repo-1_16_0_rc1.nix b/nix/repo-1_16_0_rc1.nix deleted file mode 100644 index 4dce852de07a9ae2116b6ef3a813e44aca8d5d15..0000000000000000000000000000000000000000 --- a/nix/repo-1_16_0_rc1.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ fetchFromGitHub }: -fetchFromGitHub { - owner = "fenn-cs"; - repo = "tahoe-lafs"; - rev = "f6a96ae3976ee21ad0376f7b6a22fc3d12110dce"; - sha256 = "sha256:127z83c388mvxkz1qdjqdnlj5xgshyn5w5v40vda6mpyy7k9bpb4"; -} diff --git a/nix/setup.cfg.patch b/nix/setup.cfg.patch deleted file mode 100644 index 3a2762bdb9f3e03979393e1c79f09b3ed4b67970..0000000000000000000000000000000000000000 --- a/nix/setup.cfg.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.cfg b/setup.cfg -index dfc49607..822ea8dd 100644 ---- a/setup.cfg -+++ b/setup.cfg -@@ -40,5 +40,5 @@ install_requires = - # incompatible with Tahoe-LAFS'. So duplicate them here (the ones that - # have been observed to cause problems). - Twisted[tls,conch]>=18.4.0 -- tahoe-lafs >=1.14, <1.17, !=1.15.* -+ tahoe-lafs - treq - - [versioneer] diff --git a/nix/tahoe-lafs-1_16.nix b/nix/tahoe-lafs-1_16.nix deleted file mode 100644 index 0aed9bd9b1b83c3ff40bf33c5597c10cfd46c28e..0000000000000000000000000000000000000000 --- a/nix/tahoe-lafs-1_16.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ callPackage }: -let - repo = callPackage ./repo-1_16_0_rc1.nix { }; - tahoe-lafs = callPackage "${repo}/nix" { }; -in - tahoe-lafs diff --git a/overlays.nix b/overlays.nix deleted file mode 100644 index a56387cc6297699930dbde34ae7ed3327218bb50..0000000000000000000000000000000000000000 --- a/overlays.nix +++ /dev/null @@ -1,19 +0,0 @@ -self: super: { - ristretto = super.callPackage ./ristretto.nix { }; - - python27 = super.python27.override { - packageOverrides = python-self: python-super: { - # The newest typing is incompatible with the packaged version of - # Hypothesis. Upgrading Hypothesis is like pulling on a loose thread in - # a sweater. I pulled it as far as pytest where I found there was no - # upgrade route because pytest has dropped Python 2 support. - # Fortunately, downgrading typing ends up being fairly straightforward. - # - # For now. This is, no doubt, a sign of things to come for the Python 2 - # ecosystem - the early stages of a slow, painful death by the thousand - # cuts of incompatibilities between libraries with no maintained Python - # 2 support. - typing = python-self.callPackage ./typing.nix { }; - }; - }; -} diff --git a/python-challenge-bypass-ristretto-repo.nix b/python-challenge-bypass-ristretto-repo.nix deleted file mode 100644 index c7e246f6c2bfb2b8b2fb73bc02ef38b818ac4ddf..0000000000000000000000000000000000000000 --- a/python-challenge-bypass-ristretto-repo.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - pkgs = import <nixpkgs> {}; -in - pkgs.fetchFromGitHub { - owner = "LeastAuthority"; - repo = "python-challenge-bypass-ristretto"; - rev = "f1a7cfab1a7f1bf8b3345c228c2183064889ad83"; - sha256 = "12myak2jwaisljs7bmx1vydgd0fnxvkaisk4zsf0kshwxrlnyh3x"; - } \ No newline at end of file diff --git a/python-challenge-bypass-ristretto.nix b/python-challenge-bypass-ristretto.nix deleted file mode 100644 index 0824d347c371b03705e3021e074508ebbd5a5a0f..0000000000000000000000000000000000000000 --- a/python-challenge-bypass-ristretto.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ callPackage }: -let - src = import ./python-challenge-bypass-ristretto-repo.nix; - python-challenge-bypass-ristretto = callPackage "${src}" { }; -in - python-challenge-bypass-ristretto.overrideAttrs (old: { - patches = [ - ./remove-setuptools-scm.patch - ]; - }) diff --git a/typing.nix b/typing.nix deleted file mode 100644 index 84c08746f9fdc6bc19bd121e37f168febefb2025..0000000000000000000000000000000000000000 --- a/typing.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pythonOlder, isPy3k, isPyPy, python }: - -let - testDir = if isPy3k then "src" else "python2"; - -in buildPythonPackage rec { - pname = "typing"; - version = "3.6.6"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256:0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"; - }; - - # Error for Python3.6: ImportError: cannot import name 'ann_module' - # See https://github.com/python/typing/pull/280 - # Also, don't bother on PyPy: AssertionError: TypeError not raised - doCheck = pythonOlder "3.6" && !isPyPy; - - checkPhase = '' - cd ${testDir} - ${python.interpreter} -m unittest discover - ''; - - meta = with lib; { - description = "Backport of typing module to Python versions older than 3.5"; - homepage = https://docs.python.org/3/library/typing.html; - license = licenses.psfl; - }; -} diff --git a/zkapauthorizer.nix b/zkapauthorizer.nix deleted file mode 100644 index 484c364166b2179a50e47e97acc468600949755e..0000000000000000000000000000000000000000 --- a/zkapauthorizer.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ lib -, buildPythonPackage, sphinx, git -, attrs, zope_interface, aniso8601, twisted, tahoe-lafs, challenge-bypass-ristretto, treq -, fixtures, testtools, hypothesis, pyflakes, coverage -, hypothesisProfile ? null -, collectCoverage ? false -, testSuite ? null -, trialArgs ? null -}: -let - hypothesisProfile' = if hypothesisProfile == null then "default" else hypothesisProfile; - testSuite' = if testSuite == null then "_zkapauthorizer" else testSuite; - defaultTrialArgs = [ "--rterrors" ] ++ ( lib.optional ( ! collectCoverage ) "--jobs=$NIX_BUILD_CORES" ); - trialArgs' = if trialArgs == null then defaultTrialArgs else trialArgs; - extraTrialArgs = builtins.concatStringsSep " " trialArgs'; -in -buildPythonPackage rec { - version = "0.0"; - pname = "zero-knowledge-access-pass-authorizer"; - name = "${pname}-${version}"; - src = ./.; - - outputs = [ "out" ] ++ (if collectCoverage then [ "doc" ] else [ ]); - - depsBuildBuild = [ - git - sphinx - ]; - - patches = [ - # Remove the Tahoe-LAFS version pin in distutils config. We have our own - # pinning and also our Tahoe-LAFS package has a bogus version number. :/ - ./nix/setup.cfg.patch - ]; - - propagatedBuildInputs = [ - aniso8601 - tahoe-lafs - challenge-bypass-ristretto - - # Inherit some things from tahoe-lafs to avoid conflicting versions - # - # attrs - # zope_interface - # twisted - # eliot - # treq - ]; - - checkInputs = [ - coverage - fixtures - testtools - hypothesis - ]; - - checkPhase = '' - runHook preCheck - "${pyflakes}/bin/pyflakes" src/_zkapauthorizer - ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} python -m ${if collectCoverage - then "coverage run --debug=config --module" - else "" - } twisted.trial ${extraTrialArgs} ${testSuite'} - runHook postCheck - ''; - - postCheck = if collectCoverage - then '' - mkdir -p "$doc/share/doc/${name}" - cp -v .coverage.* "$doc/share/doc/${name}" - '' - else ""; -}