1
1
mirror of https://github.com/google/ormolu.git synced 2024-12-02 23:43:34 +03:00
ormolu/default.nix

30 lines
692 B
Nix
Raw Normal View History

let
pkgs = import ./nix/nixpkgs;
compiler = "ghc864";
source = pkgs.lib.sourceByRegex ./.[
"^.*\.md$"
"^app.*$"
"^data.*$"
"^ormolu.cabal$"
"^src.*$"
"^tests.*$"
];
haskellPackages = pkgs.haskell.packages.${compiler}.override {
overrides = (self: super:
super // {
"ormolu" = super.callCabal2nix "ormolu" source { };
});
};
ormolize = import ./nix/ormolize {
inherit pkgs;
inherit haskellPackages;
};
in {
ormolu = haskellPackages.ormolu;
ormolu-shell = haskellPackages.shellFor {
packages = ps: [ ps.ormolu ];
buildInputs = [ pkgs.cabal-install ];
};
hackage = pkgs.lib.mapAttrs ormolize haskellPackages;
}