diff --git a/nixpkgs.nix b/nixpkgs.nix index c3086292210b535df82387f5c149b4c905e4d5a8..28889093ccc5ba3ac9feb2a099181fdea64b4dda 100644 --- a/nixpkgs.nix +++ b/nixpkgs.nix @@ -1,9 +1,6 @@ { pkgs ? import <nixpkgs> { } }: let - nixpkgs = fetchTarball - { url = "https://github.com/NixOS/nixpkgs-channels/archive/4557b9f1f50aa813ae673fe6fcd30ca872968947.tar.gz"; - sha256 = "0cam48cn042axcik9vqxsqjc2hwyb2grjbjxacsn4w0y1zk6k6l2"; - }; + nixpkgs = pkgs.path; args = { overlays = [ (import ./overlays.nix) ]; }; diff --git a/overlays.nix b/overlays.nix index a22a766007e627e2f9a6cf96153c77d0b82c2f58..9a50dadb40152a238832c1402b3b9944ee45c4a1 100644 --- a/overlays.nix +++ b/overlays.nix @@ -5,6 +5,18 @@ self: super: { 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-super.callPackage ./typing.nix { }; + # new tahoe-lafs dependency eliot = python-super.callPackage ./eliot.nix { }; # new autobahn requires a newer cryptography diff --git a/privacypass-repo.nix b/privacypass-repo.nix index cda604a39095585bd50db0d0ae0754fdd45e9fd2..6b0c64cff07889c23400e15e1d2824d3ac8905cf 100644 --- a/privacypass-repo.nix +++ b/privacypass-repo.nix @@ -2,7 +2,6 @@ fetchFromGitHub { owner = "LeastAuthority"; repo = "privacypass"; - rev = "5126376574ac126d2cdcd0612ef0ed65ef7bca6e"; - sha256 = "sha256:1b53315qf3yp9mzrx7nmmqj9gia211yhrzg31jp8ny10w6vgbxmn"; - fetchSubmodules = true; + rev = "45855401e163f8e622bd93a5c5bce13de8c8510a"; + sha256 = "sha256:15wv8vas6x8cdicylp0m632c916p7qxq1k4lnchr8c92lldp0rv7"; } diff --git a/tahoe-lafs.nix b/tahoe-lafs.nix index de4940d98bc36335c60480aaa0cdff90db3bae01..5dd929dadf082dd8a657515aa1f4e4f2bb642228 100644 --- a/tahoe-lafs.nix +++ b/tahoe-lafs.nix @@ -1,6 +1,6 @@ { fetchFromGitHub, nettools, python , twisted, foolscap, nevow, zfec -, setuptoolsTrial, pyasn1, zope_interface +, setuptools, setuptoolsTrial, pyasn1, zope_interface , service-identity, pyyaml, magic-wormhole, treq, appdirs , eliot, autobahn, cryptography }: @@ -11,9 +11,9 @@ python.pkgs.buildPythonPackage rec { owner = "LeastAuthority"; repo = "tahoe-lafs"; # HEAD of an integration branch for all of the storage plugin stuff. Last - # updated August 23 2019. - rev = "d4b5de2e08e26ad2cc14265a5993be2ecc791d5b"; - sha256 = "1l2da13w43zzwr1z262zhhq4hq3sha4zrxp7d46zmjn4ya0ixksf"; + # updated October 4 2019. + rev = "8c1f536ba4fbc01f3bc5f08412edbefc56ff7037"; + sha256 = "17d7pkbsgss3rhqf7ac7ylzbddi555rnkzz48zjqwq1zx1z2jhy6"; }; postPatch = '' @@ -34,7 +34,7 @@ python.pkgs.buildPythonPackage rec { setuptoolsTrial pyasn1 zope_interface service-identity pyyaml magic-wormhole treq - eliot autobahn cryptography + eliot autobahn cryptography setuptools ]; checkInputs = with python.pkgs; [ @@ -44,7 +44,6 @@ python.pkgs.buildPythonPackage rec { ]; checkPhase = '' - ${python}/bin/python -m twisted.trial -j4 allmydata + $out/bin/tahoe --version ''; - doCheck = false; } diff --git a/typing.nix b/typing.nix new file mode 100644 index 0000000000000000000000000000000000000000..84c08746f9fdc6bc19bd121e37f168febefb2025 --- /dev/null +++ b/typing.nix @@ -0,0 +1,30 @@ +{ 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; + }; +}