From 3a61ef6e078e9dbb76aee46500a0edd54ff3e904 Mon Sep 17 00:00:00 2001 From: Evan Relf Date: Fri, 23 Apr 2021 10:31:00 -0700 Subject: [PATCH] Add Haskell packages overlay --- nix/overlays/haskell-packages.nix | 20 ++++++++++++++++++++ nix/pkgs.nix | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 nix/overlays/haskell-packages.nix diff --git a/nix/overlays/haskell-packages.nix b/nix/overlays/haskell-packages.nix new file mode 100644 index 0000000..69169ba --- /dev/null +++ b/nix/overlays/haskell-packages.nix @@ -0,0 +1,20 @@ +pkgsFinal: pkgsPrev: + +let + extension = pkgsPrev.haskell.lib.packageSourceOverrides { + hocker = pkgsPrev.nix-gitignore.gitignoreSource [ ] ../../.; + }; + +in +{ + haskellPackages = + pkgsPrev.haskellPackages.override (old: { + overrides = + pkgsPrev.lib.fold + pkgsPrev.lib.composeExtensions + (old.overrides or (_: _: { })) + [ + extension + ]; + }); +} diff --git a/nix/pkgs.nix b/nix/pkgs.nix index 53327c8..e407ccc 100644 --- a/nix/pkgs.nix +++ b/nix/pkgs.nix @@ -12,4 +12,7 @@ let in import nixpkgs { config = { allowUnfree = true; }; + overlays = [ + (import ./overlays/haskell-packages.nix) + ]; }