nani.wtf/flake.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

2021-06-13 06:02:29 +02:00
{
description = "hakyll-nix-template";
nixConfig.bash-prompt = "[nix]λ ";
2021-06-13 06:02:29 +02:00
2022-11-05 19:19:55 +01:00
inputs.nixpkgs.url = "nixpkgs/nixos-22.05";
2021-06-13 06:02:29 +02:00
2022-11-01 17:51:36 +01:00
outputs = { nixpkgs, self }: let
system = "x86_64-linux";
overlays = [ (import ./nix/haskell-overlay.nix) ];
pkgs = import nixpkgs { inherit overlays system; };
2022-11-05 19:19:55 +01:00
in {
2022-11-01 17:51:36 +01:00
overlays = {
haskell-overlay = import ./nix/haskell-overlay.nix;
default = self.overlays.haskell-overlay;
};
packages.${system} = with pkgs.myHaskellPackages; {
inherit ssg website;
default = website;
};
apps.${system} = {
hakyll-site = let
2022-11-05 19:19:55 +01:00
drv = self.packages.${system}.ssg;
2022-11-01 17:51:36 +01:00
exePath = "/bin/hakyll-site";
in {
type = "app";
program = "${drv}${exePath}";
};
default = self.apps.${system}.hakyll-site;
};
devShells.${system}.default = pkgs.myHaskellPackages.shellFor {
packages = p: [ p.ssg ];
buildInputs = with pkgs.myHaskellPackages; [
# ssg
# Helpful tools for `nix develop` shells
ghcid # https://github.com/ndmitchell/ghcid
haskell-language-server # https://github.com/haskell/haskell-language-server
hlint # https://github.com/ndmitchell/hlint
ormolu # https://github.com/tweag/ormolu
];
withHoogle = true;
};
hydraJobs = {
ssg.${system} = self.packages.${system}.ssg;
website.${system} = self.packages.${system}.website;
};
};
2021-06-13 06:02:29 +02:00
}