check-hlint = pkgs.runCommand "check-hlint" {
src = nix-thunk.haskellPackageSource;
buildInputs = [
# The shared Obsidian hlint, from the style.hs submodule. The wrapper
# supplies its own bundled config, so no --hint flag is needed here.
#
# Deliberately *not* given our own `pkgs`: style.hs pins the hlint it was
# written against (3.10), while our nixpkgs has 3.8, and the two disagree
# about which hints fire. Using its pin keeps CI in step with what
# `nix run github:obsidiansystems/style.hs#hlint` reports locally.
(import ./dep/style.hs/hlint.nix {})
];
} ''
set -euo pipefail
hlint "$src"
touch "$out" # Make the derivation succeed if we get this far
'';
Apply
style.hstoreflex+reflex-domhttps://github.com/obsidiansystems/style.hs
Add as a git submodule under
dep/Symlink
fourmolu.yamland.hlint.yamltodep/style.hs/{fourmolu.yaml,.hlint.yaml}Run
./fourmolu.yamlon source code directories (it's self-executing)Run
./.hlint.yamlon source code directories (it's self-executing)style.hshlint config and make a PRAdd
check-fourmolutorelease.nix. Example:Add
check-hlinttorelease.nix. Example:Make sure it is part of CI checks