Merge pull request #2 from srid/srid/issue1

This commit is contained in:
Sridhar Ratnakumar 2021-12-05 16:51:31 -05:00 committed by GitHub
commit 3e414abd5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,21 @@
overlays = [ ];
pkgs =
import nixpkgs { inherit system overlays; config.allowBroken = true; };
# https://github.com/NixOS/nixpkgs/issues/140774#issuecomment-976899227
m1MacHsBuildTools =
pkgs.haskellPackages.override {
overrides = self: super:
let
workaround140774 = hpkg: with pkgs.haskell.lib;
overrideCabal hpkg (drv: {
enableSeparateBinOutput = false;
});
in
{
ghcid = workaround140774 super.ghcid;
ormolu = workaround140774 super.ormolu;
};
};
project = returnShellEnv:
pkgs.haskellPackages.developPackage {
inherit returnShellEnv;
@ -25,8 +40,10 @@
# cf. https://tek.brick.do/K3VXJd8mEKO7
};
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
pkgs.haskell.lib.addBuildTools drv
(with (if system == "aarch64-darwin"
then m1MacHsBuildTools
else pkgs.haskellPackages); [
# Specify your build/dev dependencies here.
cabal-fmt
cabal-install