bbdf547e54
resolves #4
37 lines
928 B
Nix
37 lines
928 B
Nix
let sources = import ./nix/sources.nix;
|
|
in { compiler ? "ghc902", pkgs ? import sources.nixpkgs { } }:
|
|
|
|
let
|
|
inherit (pkgs.lib.trivial) flip pipe;
|
|
inherit (pkgs.haskell.lib) appendPatch appendConfigureFlags;
|
|
|
|
haskellPackages = pkgs.haskell.packages.${compiler}.override {
|
|
overrides = hpNew: hpOld: {
|
|
hakyll = pipe hpOld.hakyll [
|
|
(flip appendPatch ./hakyll.patch)
|
|
(flip appendConfigureFlags [ "-f" "watchServer" "-f" "previewServer" ])
|
|
];
|
|
|
|
jfdic-web = hpNew.callCabal2nix "jfdic-web" ./. { };
|
|
|
|
niv = import sources.niv { };
|
|
};
|
|
};
|
|
|
|
project = haskellPackages.jfdic-web;
|
|
in {
|
|
project = project;
|
|
|
|
shell = haskellPackages.shellFor {
|
|
packages = p: with p; [ project ];
|
|
buildInputs = with haskellPackages; [
|
|
ghcid # GHCi based IDE
|
|
hlint # or ormolu
|
|
pkgs.niv
|
|
pkgs.tea # Gitea official CLI client
|
|
zlib
|
|
];
|
|
withHoogle = true;
|
|
};
|
|
}
|