1
1
mirror of https://github.com/srid/ema.git synced 2024-12-01 15:13:36 +03:00
ema/flake.nix

48 lines
1.4 KiB
Nix
Raw Normal View History

2021-04-19 18:07:52 +03:00
{
description = "Ema project";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/8389dcb67d934ee72c1d1e7228d92be9b3f71bad";
2021-04-19 18:07:52 +03:00
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; # To allow `org-mode` package which is broken
};
2021-04-19 18:07:52 +03:00
emaProject = returnShellEnv:
pkgs.haskellPackages.developPackage {
inherit returnShellEnv;
name = "ema";
root = ./.;
withHoogle = false;
overrides = self: super: with pkgs.haskell.lib; {
org-mode = dontCheck super.org-mode; # `tasty` dependency is broken on nixpkgs
};
2021-04-19 18:07:52 +03:00
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
cabal-install
cabal-fmt
pkgs.nixpkgs-fmt
ghcid
ormolu
haskell-language-server
]);
};
in
{
2021-04-19 18:36:51 +03:00
# Used by `nix build`
2021-04-19 18:07:52 +03:00
defaultPackage = emaProject false;
2021-04-19 18:36:51 +03:00
# Used by `nix develop`
2021-04-19 18:07:52 +03:00
devShell = emaProject true;
});
}