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