Merge pull request #2 from srid/srid/issue1
This commit is contained in:
commit
3e414abd5d
1 changed files with 27 additions and 10 deletions
37
flake.nix
37
flake.nix
|
@ -14,6 +14,21 @@
|
||||||
overlays = [ ];
|
overlays = [ ];
|
||||||
pkgs =
|
pkgs =
|
||||||
import nixpkgs { inherit system overlays; config.allowBroken = true; };
|
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:
|
project = returnShellEnv:
|
||||||
pkgs.haskellPackages.developPackage {
|
pkgs.haskellPackages.developPackage {
|
||||||
inherit returnShellEnv;
|
inherit returnShellEnv;
|
||||||
|
@ -25,16 +40,18 @@
|
||||||
# cf. https://tek.brick.do/K3VXJd8mEKO7
|
# cf. https://tek.brick.do/K3VXJd8mEKO7
|
||||||
};
|
};
|
||||||
modifier = drv:
|
modifier = drv:
|
||||||
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
|
pkgs.haskell.lib.addBuildTools drv
|
||||||
[
|
(with (if system == "aarch64-darwin"
|
||||||
# Specify your build/dev dependencies here.
|
then m1MacHsBuildTools
|
||||||
cabal-fmt
|
else pkgs.haskellPackages); [
|
||||||
cabal-install
|
# Specify your build/dev dependencies here.
|
||||||
ghcid
|
cabal-fmt
|
||||||
haskell-language-server
|
cabal-install
|
||||||
ormolu
|
ghcid
|
||||||
pkgs.nixpkgs-fmt
|
haskell-language-server
|
||||||
]);
|
ormolu
|
||||||
|
pkgs.nixpkgs-fmt
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue