seal-blog/flake.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

2023-04-10 19:42:25 -04:00
{
description = "A Nix flake for my long-running seal blog";
inputs = {
2023-08-02 17:02:43 -04:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
2023-04-10 19:42:25 -04:00
utils.url = "github:numtide/flake-utils";
spg.url = "git+https://git.ewanick.com/bill/sealPostGenerator.git";
spg.inputs.nixpkgs.follows = "nixpkgs";
spg.inputs.utils.follows = "utils";
2023-04-10 19:42:25 -04:00
};
outputs = { self, nixpkgs, utils, ... }@inputs:
2023-04-10 19:42:25 -04:00
utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
ghc' = pkgs.haskellPackages.ghcWithHoogle (self: with self; [
2023-04-19 18:42:09 -04:00
dhall
2023-04-10 19:42:25 -04:00
hakyll
neat-interpolation
random
split
]);
in
{
apps.generateSealPosts = {
type = "app";
program = "${inputs.spg.packages.${system}.default}/bin/generateSealPosts";
};
2023-04-10 19:42:25 -04:00
devShells.default = pkgs.mkShell {
name = "hakyll-shell";
buildInputs = with pkgs.haskellPackages; [
ghc'
hlint
haskell-language-server
2023-08-02 17:01:35 -04:00
(pkgs.writeShellScriptBin "build-site" ''
${ghc'}/bin/ghc --make website/site -outputdir dist -static -O2
'')
];
2023-04-10 19:42:25 -04:00
};
});
}