diff --git a/default.nix b/default.nix index 868ef99b1da8c5b3a29a284b53d4bb7165cfb3d9..cc526bf34eaac576f52525637c2a524fc97f21f3 100644 --- a/default.nix +++ b/default.nix @@ -3,8 +3,19 @@ , collectCoverage ? false , testSuite ? null , trialArgs ? null +, tahoe-lafs ? null }: -let pkgs' = pkgs.extend (import ./overlays.nix); -in pkgs'.python27Packages.zkapauthorizer.override { +let + pkgs' = pkgs.extend (import ./overlays.nix); + callPackage = pkgs'.python27Packages.callPackage; + tahoe-lafs' = ( + if tahoe-lafs != null + then tahoe-lafs + else callPackage ./tahoe-lafs.nix { } + ); +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/overlays.nix b/overlays.nix index 3d548fade895e7a390596fd56861d37ed753c5dc..a56387cc6297699930dbde34ae7ed3327218bb50 100644 --- a/overlays.nix +++ b/overlays.nix @@ -14,17 +14,6 @@ self: super: { # cuts of incompatibilities between libraries with no maintained Python # 2 support. typing = python-self.callPackage ./typing.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 ./tahoe-lafs.nix { }; - - # we depend on the challenge-bypass-ristretto python package, a set of - # bindings to the challenge-bypass-ristretto Rust crate. - challenge-bypass-ristretto = python-self.callPackage ./python-challenge-bypass-ristretto.nix { }; - - # And add ourselves to the collection too. - zkapauthorizer = python-self.callPackage ./zkapauthorizer.nix { }; }; }; }