1
1
mirror of https://github.com/google/ormolu.git synced 2024-11-23 22:27:16 +03:00
ormolu/default.nix
mrkkrp 34b9b71601 Build the project with Nix and switct to GHC 8.6.4
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.
2019-05-31 14:43:15 +02:00

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