reciproka-web/release.nix
2024-01-08 17:18:12 +10:00

37 lines
940 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" ])
];
reciproka-web = hpNew.callCabal2nix "reciproka-web" ./. { };
niv = import sources.niv { };
};
};
project = haskellPackages.reciproka-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;
};
}