2019-08-16 13:02:00 +03:00
|
|
|
{ pkgs ? (import ./nix/nixpkgs) }:
|
|
|
|
|
2019-06-19 23:48:47 +03:00
|
|
|
let
|
2019-08-28 15:15:35 +03:00
|
|
|
ormoluCompiler = "ghc865";
|
2019-07-14 02:01:02 +03:00
|
|
|
source = pkgs.lib.sourceByRegex ./.[
|
|
|
|
"^.*\.md$"
|
|
|
|
"^app.*$"
|
|
|
|
"^data.*$"
|
|
|
|
"^ormolu.cabal$"
|
|
|
|
"^src.*$"
|
|
|
|
"^tests.*$"
|
|
|
|
];
|
2019-08-16 13:02:00 +03:00
|
|
|
haskellPackages = pkgs.haskell.packages.${ormoluCompiler}.override {
|
|
|
|
overrides = ormoluOverlay;
|
2019-06-19 23:48:47 +03:00
|
|
|
};
|
2019-08-16 13:02:00 +03:00
|
|
|
ormoluOverlay = self: super: {
|
2019-08-30 05:43:38 +03:00
|
|
|
"ormolu" = super.callCabal2nix "ormolu" source { };
|
|
|
|
};
|
2019-07-14 02:01:02 +03:00
|
|
|
ormolize = import ./nix/ormolize {
|
|
|
|
inherit pkgs;
|
|
|
|
inherit haskellPackages;
|
|
|
|
};
|
2019-08-30 05:43:38 +03:00
|
|
|
ormolizedPackages = doCheck:
|
|
|
|
pkgs.lib.mapAttrs (_: v: ormolize { package = v; inherit doCheck; }) haskellPackages;
|
2019-06-19 23:48:47 +03:00
|
|
|
in {
|
|
|
|
ormolu = haskellPackages.ormolu;
|
2019-08-16 13:02:00 +03:00
|
|
|
ormoluShell = haskellPackages.shellFor {
|
2019-06-19 23:48:47 +03:00
|
|
|
packages = ps: [ ps.ormolu ];
|
2019-08-06 14:29:50 +03:00
|
|
|
buildInputs = [ haskellPackages.cabal-install haskellPackages.ghcid ];
|
2019-06-19 23:48:47 +03:00
|
|
|
};
|
2019-08-16 13:02:00 +03:00
|
|
|
inherit ormoluOverlay ormoluCompiler;
|
2019-08-30 05:43:38 +03:00
|
|
|
hackage = ormolizedPackages false;
|
|
|
|
hackageTests = with pkgs.lib; pkgs.recurseIntoAttrs (
|
|
|
|
let ps = [
|
|
|
|
"QuickCheck"
|
|
|
|
"ShellCheck"
|
|
|
|
"aeson"
|
|
|
|
"attoparsec"
|
2019-09-04 13:05:48 +03:00
|
|
|
"aws"
|
2019-08-30 05:43:38 +03:00
|
|
|
"cassava"
|
|
|
|
"conduit"
|
|
|
|
"cryptonite"
|
|
|
|
"diagrams-core"
|
|
|
|
"distributed-process"
|
|
|
|
"esqueleto"
|
|
|
|
"fay"
|
2019-09-04 13:05:48 +03:00
|
|
|
"haxl"
|
2019-08-30 05:43:38 +03:00
|
|
|
"hedgehog"
|
|
|
|
"hlint"
|
|
|
|
"megaparsec"
|
2019-09-04 13:05:48 +03:00
|
|
|
"ormolu"
|
2019-08-30 05:43:38 +03:00
|
|
|
"postgrest"
|
|
|
|
"servant"
|
|
|
|
"servant-server"
|
|
|
|
"tensorflow"
|
2019-09-04 09:33:58 +03:00
|
|
|
"text_1_2_4_0"
|
2019-09-06 20:22:15 +03:00
|
|
|
"tls"
|
2019-09-04 13:05:48 +03:00
|
|
|
"yesod-core"
|
2019-08-30 05:43:38 +03:00
|
|
|
|
|
|
|
# Comment idempotence issue
|
|
|
|
|
|
|
|
# "Agda"
|
|
|
|
# "brick"
|
|
|
|
# "hakyll"
|
|
|
|
# "hledger"
|
|
|
|
# "http-client"
|
|
|
|
# "idris"
|
|
|
|
# "intero"
|
|
|
|
# "leksah"
|
|
|
|
# "pandoc"
|
|
|
|
# "pipes"
|
|
|
|
# "stack"
|
|
|
|
|
|
|
|
# Missing language extension
|
|
|
|
|
|
|
|
# "lens" #fixed in master
|
|
|
|
# "purescript"
|
|
|
|
|
|
|
|
];
|
|
|
|
in listToAttrs (map (p: nameValuePair p (ormolizedPackages true).${p}) ps)
|
|
|
|
);
|
2019-06-19 23:48:47 +03:00
|
|
|
}
|