mirror of
https://github.com/google/ormolu.git
synced 2024-11-27 13:13:23 +03:00
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
|