nani.wtf/flake.nix

53 lines
1.4 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
inputs = {
2022-03-13 22:34:31 +01:00
nixpkgs.url = "nixpkgs/nixos-21.11";
2021-06-13 06:02:29 +02:00
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { flake-utils, nixpkgs, self }:
flake-utils.lib.eachDefaultSystem (system:
let
config = {};
2022-03-13 22:34:31 +01:00
overlays = [ (import ./nix/haskell-overlay.nix) ];
2021-06-13 06:02:29 +02:00
pkgs = import nixpkgs { inherit config overlays system; };
in rec {
defaultPackage = packages.website;
defaultApp = apps.hakyll-site;
packages = with pkgs.myHaskellPackages; { inherit ssg website; };
2022-03-13 22:34:31 +01:00
apps.hakyll-site = let
2021-06-13 06:02:29 +02:00
drv = packages.ssg;
exePath = "/bin/hakyll-site";
2022-03-13 22:34:31 +01:00
in {
type = "app";
program = "${drv}${exePath}";
2021-06-13 06:02:29 +02:00
};
devShell = pkgs.myHaskellPackages.shellFor {
packages = p: [ p.ssg ];
buildInputs = with pkgs.myHaskellPackages; [
2022-03-19 00:59:36 +01:00
# ssg
2021-06-13 06:02:29 +02:00
# Helpful tools for `nix develop` shells
2022-03-13 22:34:31 +01:00
ghcid # https://github.com/ndmitchell/ghcid
2022-03-16 11:12:21 +01:00
haskell-language-server # https://github.com/haskell/haskell-language-server
hlint # https://github.com/ndmitchell/hlint
ormolu # https://github.com/tweag/ormolu
2021-06-13 06:02:29 +02:00
];
withHoogle = true;
};
}
);
}