commit 4420e5c2603d067efbb3e9037e010271b14531ce parent dce0fbb94dd6f775ffe0a9e94be366b9d5256e00 Author: Jared Tobin <jared@jtobin.io> Date: Tue, 27 Feb 2024 15:54:20 +0400 nix: better overrides Instead of overriding nixpkgs entirely, just override the haskell packages set for our compiler. Diffstat:
M | flake.nix | | | 16 | ++++++---------- |
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/flake.nix b/flake.nix @@ -11,19 +11,15 @@ let lib = "ppad-csecp256k1"; - config = { - packageOverrides = super: let self = super.pkgs; in rec { - haskell = super.haskell // { - packageOverrides = self: super: { - ${lib} = super.callCabal2nix lib ./. {}; - }; - }; + pkgs = import nixpkgs { inherit system; }; + hlib = pkgs.haskell.lib; + + hpkgs = pkgs.haskell.packages.ghc964.override { + overrides = new: old: rec { + ${lib} = old.callCabal2nix lib ./. {}; }; }; - pkgs = import nixpkgs { inherit system; inherit config; }; - hpkgs = pkgs.haskell.packages.ghc964; - cc = pkgs.stdenv.cc; ghc = hpkgs.ghc; cabal = hpkgs.cabal-install;