matrix-media-expanded/flake.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2021-05-31 23:19:51 +00:00
{
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;
});
}