2022-06-29 06:54:36 +00:00
|
|
|
let sources = import ./nix/sources.nix;
|
2022-06-29 08:06:29 +00:00
|
|
|
in { compiler ? "ghc902", pkgs ? import sources.nixpkgs { } }:
|
2021-11-03 02:15:15 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (pkgs.lib.trivial) flip pipe;
|
|
|
|
inherit (pkgs.haskell.lib) appendPatch appendConfigureFlags;
|
|
|
|
|
|
|
|
haskellPackages = pkgs.haskell.packages.${compiler}.override {
|
|
|
|
overrides = hpNew: hpOld: {
|
2022-06-29 06:54:36 +00:00
|
|
|
hakyll = pipe hpOld.hakyll [
|
|
|
|
(flip appendPatch ./hakyll.patch)
|
|
|
|
(flip appendConfigureFlags [ "-f" "watchServer" "-f" "previewServer" ])
|
|
|
|
];
|
2021-11-03 02:15:15 +00:00
|
|
|
|
2023-08-24 10:58:49 +00:00
|
|
|
reciproka-web = hpNew.callCabal2nix "reciproka-web" ./. { };
|
2021-11-03 02:15:15 +00:00
|
|
|
|
|
|
|
niv = import sources.niv { };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-08-24 10:58:49 +00:00
|
|
|
project = haskellPackages.reciproka-web;
|
2022-06-29 06:54:36 +00:00
|
|
|
in {
|
2021-11-03 02:15:15 +00:00
|
|
|
project = project;
|
|
|
|
|
|
|
|
shell = haskellPackages.shellFor {
|
2022-06-29 06:54:36 +00:00
|
|
|
packages = p: with p; [ project ];
|
2021-11-12 06:30:39 +00:00
|
|
|
buildInputs = with haskellPackages; [
|
2022-06-29 06:54:36 +00:00
|
|
|
ghcid # GHCi based IDE
|
|
|
|
hlint # or ormolu
|
|
|
|
pkgs.niv
|
2023-03-24 04:38:19 +00:00
|
|
|
pkgs.tea # Gitea official CLI client
|
2022-06-29 06:54:36 +00:00
|
|
|
zlib
|
2021-11-12 06:30:39 +00:00
|
|
|
];
|
2021-11-03 02:15:15 +00:00
|
|
|
withHoogle = true;
|
|
|
|
};
|
|
|
|
}
|