1
1
mirror of https://github.com/google/ormolu.git synced 2024-11-27 13:13:23 +03:00
ormolu/default.nix

32 lines
799 B
Nix
Raw Normal View History

{ pkgs ? (import ./nix/nixpkgs) }:
let
ormoluCompiler = "ghc864";
source = pkgs.lib.sourceByRegex ./.[
"^.*\.md$"
"^app.*$"
"^data.*$"
"^ormolu.cabal$"
"^src.*$"
"^tests.*$"
];
haskellPackages = pkgs.haskell.packages.${ormoluCompiler}.override {
overrides = ormoluOverlay;
};
ormoluOverlay = self: super: {
"ormolu" = super.callCabal2nix "ormolu" source { };
};
ormolize = import ./nix/ormolize {
inherit pkgs;
inherit haskellPackages;
};
in {
ormolu = haskellPackages.ormolu;
ormoluShell = haskellPackages.shellFor {
packages = ps: [ ps.ormolu ];
2019-08-06 14:29:50 +03:00
buildInputs = [ haskellPackages.cabal-install haskellPackages.ghcid ];
};
inherit ormoluOverlay ormoluCompiler;
hackage = pkgs.lib.mapAttrs ormolize haskellPackages;
}