matrix-media-expanded/flake.nix
Sridhar Ratnakumar 7ae116cf34 init
2021-05-31 19:21:58 -04:00

44 lines
1.3 KiB
Nix

{
description = "haskell-template";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system:
let
overlays = [ ];
pkgs =
import nixpkgs { inherit system overlays; config.allowBroken = true; };
project = returnShellEnv:
pkgs.haskellPackages.developPackage {
inherit returnShellEnv;
name = "haskell-template";
root = ./.;
withHoogle = false;
overrides = self: super: with pkgs.haskell.lib; {
# lvar = self.callCabal2nix "lvar" inputs.ema.inputs.lvar { }; # Until lvar gets into nixpkgs
};
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
cabal-fmt
cabal-install
ghcid
haskell-language-server
ormolu
pkgs.nixpkgs-fmt
]);
};
in
{
# Used by `nix build` & `nix run`
defaultPackage = project false;
# Used by `nix develop`
devShell = project true;
});
}