From 5fe6480e4a2c2239a94368e27b36b5352be50dcf Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Mon, 3 Jan 2022 14:35:18 -0500
Subject: [PATCH] avoid making default.nix accept arbitrary arguments

it is nice to fail if someone passes in something that is not supposed to be
passsed in, rather than silently accepting and ignoring it
---
 default.nix |  1 -
 tests.nix   | 14 +++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/default.nix b/default.nix
index a0d8f5b..d07b203 100644
--- a/default.nix
+++ b/default.nix
@@ -6,7 +6,6 @@ in
 , mach-nix ? import sources.mach-nix { inherit pkgs pypiData; }
 , tahoe-lafs-source ? "tahoe-lafs"
 , tahoe-lafs-repo ? sources.${tahoe-lafs-source}
-, ...
 }:
   let
     lib = pkgs.lib;
diff --git a/tests.nix b/tests.nix
index f7dc90f..40412a7 100644
--- a/tests.nix
+++ b/tests.nix
@@ -1,8 +1,20 @@
-{ privatestorage ? import ./. args
+let
+  fixArgs = a: builtins.removeAttrs a [
+    # Make sure all the args tests.nix accepts but default.nix does not are
+    # listed here so we don't try to forward them to default.nix
+    "privatestorage"
+    "hypothesisProfile"
+    "collectCoverage"
+    "testSuite"
+    "trialArgs"
+  ];
+in
+{ privatestorage ? import ./. (fixArgs args)
 , hypothesisProfile ? null
 , collectCoverage ? false
 , testSuite ? null
 , trialArgs ? null
+# accept any other arguments to be passed on to default.nix
 , ...
 }@args:
 let
-- 
GitLab