From c561e025d12eda509959974b721e541e1e23f1a8 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Tue, 15 Oct 2019 08:35:38 -0400
Subject: [PATCH] Make it possible to run without a custom Hypothesis profile

---
 zkapauthorizer.nix | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/zkapauthorizer.nix b/zkapauthorizer.nix
index 6572ed3..75c594d 100644
--- a/zkapauthorizer.nix
+++ b/zkapauthorizer.nix
@@ -1,9 +1,12 @@
 { buildPythonPackage, sphinx, circleci-cli
 , attrs, zope_interface, twisted, tahoe-lafs, privacypass
 , fixtures, testtools, hypothesis, pyflakes, treq, coverage
-, hypothesisProfile ? "default"
+, hypothesisProfile ? null
 , collectCoverage ? false
 }:
+let
+  hypothesisProfile' = if hypothesisProfile == null then "default" else hypothesisProfile;
+in
 buildPythonPackage rec {
   version = "0.0";
   pname = "zero-knowledge-access-pass-authorizer";
@@ -39,7 +42,7 @@ buildPythonPackage rec {
   checkPhase = ''
     runHook preCheck
     "${pyflakes}/bin/pyflakes" src/_zkapauthorizer
-    ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile} python -m ${if collectCoverage
+    ZKAPAUTHORIZER_HYPOTHESIS_PROFILE=${hypothesisProfile'} python -m ${if collectCoverage
       then "coverage run --branch --source _zkapauthorizer,twisted.plugins.zkapauthorizer --module"
       else ""
     } twisted.trial _zkapauthorizer
-- 
GitLab