From c404687e818278a21321478c76018e061c412b8b Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Tue, 18 Apr 2023 08:55:19 -0400
Subject: [PATCH] allow access to the nixpkgs haskell utility library

I almost used it to narrow these two dependencies to library-only but it turns
out to not make much difference so it doesn't seem worth the extra complexity
now.

However, having access to the library might prove useful in the future.
---
 flake.nix                | 4 +++-
 nix/haskell-packages.nix | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/flake.nix b/flake.nix
index 4a94328..e6e67b9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -34,7 +34,9 @@
         src = ./.;
         compilerVersion = ghcVersion;
         packageName = "gbs-downloader";
-        hsPkgsOverrides = import ./nix/haskell-packages.nix;
+        hsPkgsOverrides = import ./nix/haskell-packages.nix {
+          haskellLib = pkgs.haskell.lib;
+        };
       };
     in {
       checks = hslib.checks {};
diff --git a/nix/haskell-packages.nix b/nix/haskell-packages.nix
index 4162d14..91bdcbc 100644
--- a/nix/haskell-packages.nix
+++ b/nix/haskell-packages.nix
@@ -1,4 +1,4 @@
-hfinal: hprev: {
+{haskellLib}: hfinal: hprev: {
   tahoe-chk = hfinal.callPackage ./tahoe-chk.nix {};
   tahoe-great-black-swamp = hfinal.callPackage ./tahoe-great-black-swamp.nix {};
 }
-- 
GitLab