2019-06-19 23:48:47 +03:00
|
|
|
let
|
|
|
|
pkgs = import ./nix/nixpkgs;
|
|
|
|
compiler = "ghc864";
|
2019-07-14 02:01:02 +03:00
|
|
|
source = pkgs.lib.sourceByRegex ./.[
|
|
|
|
"^.*\.md$"
|
|
|
|
"^app.*$"
|
|
|
|
"^data.*$"
|
|
|
|
"^ormolu.cabal$"
|
|
|
|
"^src.*$"
|
|
|
|
"^tests.*$"
|
|
|
|
];
|
2019-06-19 23:48:47 +03:00
|
|
|
haskellPackages = pkgs.haskell.packages.${compiler}.override {
|
|
|
|
overrides = (self: super:
|
|
|
|
super // {
|
|
|
|
"ormolu" = super.callCabal2nix "ormolu" source { };
|
|
|
|
});
|
|
|
|
};
|
2019-07-14 02:01:02 +03:00
|
|
|
ormolize = import ./nix/ormolize {
|
|
|
|
inherit pkgs;
|
|
|
|
inherit haskellPackages;
|
|
|
|
};
|
2019-06-19 23:48:47 +03:00
|
|
|
in {
|
|
|
|
ormolu = haskellPackages.ormolu;
|
|
|
|
ormolu-shell = haskellPackages.shellFor {
|
|
|
|
packages = ps: [ ps.ormolu ];
|
|
|
|
buildInputs = [ pkgs.cabal-install ];
|
|
|
|
};
|
2019-07-14 02:01:02 +03:00
|
|
|
hackage = pkgs.lib.mapAttrs ormolize haskellPackages;
|
2019-06-19 23:48:47 +03:00
|
|
|
}
|