1
1
mirror of https://github.com/srid/ema.git synced 2024-11-29 09:25:14 +03:00
ema/flake.nix
Sridhar Ratnakumar 3cb3154706
Add Diary example using org-mode and fsnotify (#2)
* Dairy example, prototype. Without fsnotify.

* Add basic org renderer

* Rough version of fswatcher

* Refactor, and add example org notebook
2021-04-20 15:04:48 -04:00

48 lines
1.4 KiB
Nix

{
description = "Ema project";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/8389dcb67d934ee72c1d1e7228d92be9b3f71bad";
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
};
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
};
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[
cabal-install
cabal-fmt
pkgs.nixpkgs-fmt
ghcid
ormolu
haskell-language-server
]);
};
in
{
# Used by `nix build`
defaultPackage = emaProject false;
# Used by `nix develop`
devShell = emaProject true;
});
}