mirror of
https://github.com/google/ormolu.git
synced 2024-12-02 23:43:34 +03:00
7a9aab77b3
See the description in readme.
30 lines
692 B
Nix
30 lines
692 B
Nix
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;
|
|
}
|