mirror of
https://github.com/srid/ema.git
synced 2024-12-01 15:13:36 +03:00
46 lines
1.6 KiB
Nix
46 lines
1.6 KiB
Nix
{
|
|
description = "Ema project";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/30d3d79b7d3607d56546dd2a6b49e156ba0ec634";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
flake-utils.inputs.nixpkgs.follows = "nixpkgs";
|
|
flake-compat.url = "github:edolstra/flake-compat";
|
|
flake-compat.flake = false;
|
|
};
|
|
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
name = "ema";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
emaProject = returnShellEnv:
|
|
pkgs.haskellPackages.developPackage {
|
|
inherit name returnShellEnv;
|
|
root = ./.;
|
|
withHoogle = false;
|
|
overrides = self: super: with pkgs.haskell.lib; {
|
|
# lvar = self.callCabal2nix "lvar" inputs.lvar { };
|
|
# url-slug = inputs.url-slug.defaultPackage.${system};
|
|
relude = self.callHackage "relude" "1.0.0.1" { }; # Not on nixpkgs, for some reason.
|
|
};
|
|
modifier = drv:
|
|
pkgs.haskell.lib.addBuildTools drv
|
|
(with pkgs.haskellPackages; pkgs.lib.lists.optionals returnShellEnv [
|
|
# Specify your build/dev dependencies here.
|
|
cabal-fmt
|
|
cabal-install
|
|
ghcid
|
|
haskell-language-server
|
|
ormolu
|
|
pkgs.nixpkgs-fmt
|
|
]);
|
|
};
|
|
in
|
|
rec {
|
|
# Used by `nix build`
|
|
defaultPackage = emaProject false;
|
|
|
|
# Used by `nix develop`
|
|
devShell = emaProject true;
|
|
});
|
|
}
|