Files
pandoc/flake.nix
T
John MacFarlane cfbf83c3d5 Simplify and fix flake.nix.
We don't need the workarounds any more.
We no longer include pandoc-cli, pandoc-server, or pandoc-lua-engine
in the packages. Instead, add some of the heavier dependencies to
the list of build inputs.

This is at least a temporary solution to #8818.
2023-05-09 12:37:13 -07:00

48 lines
1.4 KiB
Nix

{
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 // {
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;
}