mirror of
https://github.com/google/ormolu.git
synced 2024-12-04 06:32:12 +03:00
34b9b71601
It was decided that we're going to make the project compatible with just one GHC version at a time. Right now this version is going to be 8.6.4. A small refactoring included, plus support for the “deriving via” feature.
25 lines
641 B
Nix
25 lines
641 B
Nix
let pkgs = import ./nix/nixpkgs;
|
|
compiler = "ghc864";
|
|
sourceRegex = [
|
|
"^app.*$"
|
|
"^data.*$"
|
|
"^ormolu.cabal$"
|
|
"^src.*$"
|
|
"^tests.*$"
|
|
"^.*\.md$"
|
|
];
|
|
haskellPackages = pkgs.haskell.packages.${compiler}.override
|
|
{ overrides = (self: super:
|
|
super //
|
|
{ "ormolu" = super.callCabal2nix "ormolu" (pkgs.lib.sourceByRegex ./. sourceRegex) {};
|
|
});
|
|
};
|
|
in if pkgs.lib.inNixShell
|
|
then haskellPackages.shellFor
|
|
{ packages = (ps: [ ps.ormolu ]);
|
|
buildInputs = [
|
|
pkgs.cabal-install
|
|
];
|
|
}
|
|
else haskellPackages.ormolu
|