From 3670d96c1a9df3de7240580aa11a6d0fceaa7695 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Wed, 7 Jul 2021 14:23:00 -0400
Subject: [PATCH] arg and overlay together

---
 default.nix | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/default.nix b/default.nix
index 56decb8..2aa4d50 100644
--- a/default.nix
+++ b/default.nix
@@ -10,6 +10,8 @@ let
   # If haskellNix is not found run:
   #   niv add input-output-hk/haskell.nix -n haskellNix
 
+  libchallenge_bypass_ristretto_ffi = pkgs.callPackage ./oldnix/challenge-bypass-ristretto.nix { };
+
   # Import nixpkgs and pass the haskell.nix provided nixpkgsArgs
   pkgs = import
     # haskell.nix provides access to the nixpkgs pins which are used by our CI,
@@ -18,8 +20,12 @@ let
     haskellNix.sources.nixpkgs-2009
     # These arguments passed to nixpkgs, include some patches and also
     # the haskell.nix functionality itself as an overlay.
-    haskellNix.nixpkgsArgs;
-    libchallenge_bypass_ristretto_ffi = pkgs.callPackage ./oldnix/challenge-bypass-ristretto.nix { };
+    (haskellNix.nixpkgsArgs // {
+      overlays = haskellNix.nixpkgsArgs.overlays ++ [
+        (self: super: { inherit libchallenge_bypass_ristretto_ffi; })
+      ];
+    });
+
 
 in pkgs.haskell-nix.project {
   # 'cleanGit' cleans a source directory based on the files known by git
-- 
GitLab