forked from jgm/pandoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
53 lines (51 loc) · 1.67 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "Pandoc development";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = inputs:
let
overlay = final: prev: {
haskell = prev.haskell // {
packageOverrides = hfinal: hprev:
prev.haskell.packageOverrides hfinal hprev // {
crypton-connection = final.fetchFromGitHub {
owner = "kazu-yamamoto";
repo = "crypton-connection";
rev = "5c064b911e7327a4d399fd9dd057663d0d0fb256";
sha256 = "00j1nf9glbz0cnzd84vp08j9ybzjbm3b6gcamlqxxcjb31kllz4b";
};
pandoc = hfinal.callCabal2nix "pandoc" ./. { };
};
};
pandoc = final.haskell.lib.compose.justStaticExecutables final.haskellPackages.pandoc;
};
perSystem = system:
let
pkgs = import inputs.nixpkgs { inherit system; overlays = [ overlay ]; };
hspkgs = pkgs.haskellPackages;
in
{
devShell = hspkgs.shellFor {
withHoogle = true;
packages = p : [
p.pandoc
];
buildInputs = [
hspkgs.cabal-install
hspkgs.haskell-language-server
hspkgs.hlint
hspkgs.ghcid
hspkgs.ormolu
hspkgs.stylish-haskell
hspkgs.weeder
hspkgs.servant-server
hspkgs.hslua
pkgs.bashInteractive
];
};
defaultPackage = pkgs.pandoc;
};
in
{ inherit overlay; } //
inputs.flake-utils.lib.eachDefaultSystem perSystem;
}