forked from DGNum/dgnum.eu
c665ce2eb6
Reviewed-on: https://git.hubrecht.ovh/DGNum/dgnum.eu/pulls/7 Co-authored-by: Tom Hubrecht <tom@hubrecht.ovh> Co-committed-by: Tom Hubrecht <tom@hubrecht.ovh>
39 lines
1 KiB
Nix
39 lines
1 KiB
Nix
{
|
|
description = "Website for dgnum.eu";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
flake-compat = {
|
|
url = "github:edolstra/flake-compat";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
ssg = pkgs.callPackage ./ssg { };
|
|
defaultInputs = with pkgs; [ nixfmt shellcheck ];
|
|
in
|
|
{
|
|
formatter = pkgs.nixfmt;
|
|
|
|
devShells = {
|
|
default = pkgs.mkShell { buildInputs = [ ssg ] ++ defaultInputs; };
|
|
|
|
ssg = pkgs.haskellPackages.shellFor {
|
|
packages = _: [ ssg ];
|
|
buildInputs = with pkgs.haskellPackages;
|
|
[ cabal-install ghcid hlint ] ++ defaultInputs;
|
|
};
|
|
};
|
|
|
|
packages = {
|
|
inherit ssg;
|
|
site = pkgs.callPackage ./site { inherit ssg; };
|
|
};
|
|
defaultPackage = self.packages.${system}.site;
|
|
});
|
|
}
|