Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## Description
---

<!-- What does this PR do, and why? -->

## Checklist
### Checklist

- [ ] Titles and headings use [AP Title Case](https://titlecaseconverter.com/) (see [Style Guide](../CONTRIBUTING.md#style-guide))
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ node_modules/

### General ###
*~

# macOS
.DS_Store

# Nix
/.direnv/
/result
/result-*
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ npm run build # compile -> assets/css/tailwind.built.css
npm run watch # same, then recompile on source/content changes
```

If you do not want to install `npm` globally and have `nix` available, drop into the Nix development shell which provides `npm` and a basic Haskell toolchain.
If you do not want to install `npm` globally and have `nix` available, `nix develop` drops you into a shell with `npm` and the Haskell toolchain, including every dependency of the site generator prebuilt — so `cabal build` compiles only `site.hs` instead of spending half an hour on Pandoc. `nix build` alone gives you the `site` executable without a shell.

**Commit the regenerated `assets/css/tailwind.built.css` with your change.** CI reruns `npm run build` on every push and PR and fails if the committed copy has drifted, so a stale stylesheet cannot reach the live site.

Expand Down
26 changes: 21 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,41 @@
];
perSystem =
{
lib,
pkgs,
...
}:
let
haskellPkgs = pkgs.haskellPackages;

# Only the Haskell sources; the site content is read at run time.
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./haskell-foundation.cabal
./site.hs
./tools/social-crossposting
];
};

haskell-foundation = haskellPkgs.callCabal2nix "haskell-foundation" src { };
in
{
devShells.default = pkgs.mkShell {
packages.default = haskell-foundation;

devShells.default = haskellPkgs.shellFor {
packages = _: [ haskell-foundation ];

nativeBuildInputs = [
# Node; pinned to same version as CI.
pkgs.nodejs_24

# Haskell.
pkgs.cabal-install
pkgs.ghc
pkgs.haskell-language-server

# Screenshotting pages during design work.
(pkgs.python3.withPackages (ps: [ ps.playwright ]))

# System.
pkgs.zlib
];

env = {
Expand Down
Loading