diff --git a/.circleci/config.yml b/.circleci/config.yml index 7949f83138c5727bec74d23e6f8c372cc94184f4..494208c068b8637d73c63a9cebfa138f5c0995b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -122,7 +122,10 @@ jobs: # # Further, we want the "doc" output built as well because that's # where the coverage data ends up. - nix-build --argstr hypothesisProfile ci --arg collectCoverage true --attr doc + # + # Also limit the number of concurrent jobs because of resource + # constraints on CircleCI. :/ + nix-build --cores 1 --max-jobs 1 --argstr hypothesisProfile ci --arg collectCoverage true --attr doc - run: name: "Cache codecov" diff --git a/eliot.nix b/eliot.nix deleted file mode 100644 index f6d6b3061b1ea635bac0e694be407ca8d1b6befb..0000000000000000000000000000000000000000 --- a/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/overlays.nix b/overlays.nix index ed2d8d1af449fcc410a0182b9d26e5b2a868e858..3d548fade895e7a390596fd56861d37ed753c5dc 100644 --- a/overlays.nix +++ b/overlays.nix @@ -15,12 +15,9 @@ self: super: { # 2 support. typing = python-self.callPackage ./typing.nix { }; - # new tahoe-lafs dependency - eliot = python-self.callPackage ./eliot.nix { }; - # tahoe-lafs in nixpkgs is packaged as an application! so we have to # re-package it ourselves as a library. - tahoe-lafs = python-self.callPackage ((import ./tahoe-lafs.nix) + "/nix") { }; + tahoe-lafs = python-self.callPackage ./tahoe-lafs.nix { }; # we depend on the challenge-bypass-ristretto python package, a set of # bindings to the challenge-bypass-ristretto Rust crate. diff --git a/tahoe-lafs-repo.nix b/tahoe-lafs-repo.nix new file mode 100644 index 0000000000000000000000000000000000000000..fc944e5739e7246a922761b2c7abaf05b62b8327 --- /dev/null +++ b/tahoe-lafs-repo.nix @@ -0,0 +1,9 @@ +let + pkgs = import <nixpkgs> {}; +in + pkgs.fetchFromGitHub { + owner = "tahoe-lafs"; + repo = "tahoe-lafs"; + rev = "tahoe-lafs-1.14.0"; + sha256 = "1ahdiapg57g6icv7p2wbzgkwl9lzdlgrsvbm5485414m7z2d6las"; + } diff --git a/tahoe-lafs.nix b/tahoe-lafs.nix index c305267b8914012921a9896a2e42ef2560f42a38..212439638fb54e1dfb57d5ae91784759e234d02e 100644 --- a/tahoe-lafs.nix +++ b/tahoe-lafs.nix @@ -1,9 +1,20 @@ +{ python2Packages }: let - pkgs = import <nixpkgs> {}; + # Manually assemble the tahoe-lafs build inputs because tahoe-lafs 1.14.0 + # eliot package runs the eliot test suite which is flaky. Doing this gives + # us a place to insert a `doCheck = false` (at the cost of essentially + # duplicating tahoe-lafs' default.nix). Not ideal but at least we can throw + # it away when we upgrade to the next tahoe-lafs version. + repo = ((import ./tahoe-lafs-repo.nix) + "/nix"); + nevow-drv = repo + "/nevow.nix"; + nevow = python2Packages.callPackage nevow-drv { }; + eliot-drv = repo + "/eliot.nix"; + eliot = (python2Packages.callPackage eliot-drv { }).overrideAttrs (old: { + doInstallCheck = false; + }); + tahoe-lafs-drv = repo + "/tahoe-lafs.nix"; + tahoe-lafs = python2Packages.callPackage tahoe-lafs-drv { + inherit nevow eliot; + }; in - pkgs.fetchFromGitHub { - owner = "tahoe-lafs"; - repo = "tahoe-lafs"; - rev = "34aeefd3ddbf28dafbc3477e52461eafa53b545d"; - sha256 = "0l8n4njbzgiwmn3qsmvzyzqlb0y9bj9g2jvpdynvsn1ggxrqmvsq"; - } \ No newline at end of file + tahoe-lafs diff --git a/zkapauthorizer.nix b/zkapauthorizer.nix index a5e611b4c8879f65aa12c63c968de225a96834ac..a718487de5a73e6710982f1a449fd666c47206e0 100644 --- a/zkapauthorizer.nix +++ b/zkapauthorizer.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage, sphinx, git -, attrs, zope_interface, eliot, aniso8601, twisted, tahoe-lafs, challenge-bypass-ristretto, treq +, attrs, zope_interface, aniso8601, twisted, tahoe-lafs, challenge-bypass-ristretto, treq , fixtures, testtools, hypothesis, pyflakes, coverage , hypothesisProfile ? null , collectCoverage ? false @@ -31,7 +31,8 @@ buildPythonPackage rec { attrs zope_interface aniso8601 - eliot + # Inherit eliot from tahoe-lafs + # eliot twisted tahoe-lafs challenge-bypass-ristretto