maintainers/haskell: format with treefmt config

This commit is contained in:
Matt Sturgeon
2026-08-19 22:54:29 +01:00
parent f63d20c57d
commit 88ea86a970
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils haskellPackages.cabal2nix-unstable.bin git -I nixpkgs=.
#! nix-shell -i bash -E 'with import ../../.. {}; mkShell { packages = [ bash coreutils haskellPackages.cabal2nix-unstable.bin git (import ../../../ci {}).fmt.pkg ]; }'
set -euo pipefail
@@ -102,7 +102,7 @@ run_hackage2nix
fi
nixfmt pkgs/development/haskell-modules/hackage-packages.nix
treefmt --no-cache pkgs/development/haskell-modules/hackage-packages.nix
if [[ "$DO_COMMIT" -eq 1 ]]; then
git add pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml

View File

@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p coreutils curl jq gnused haskellPackages.cabal2nix-unstable.bin nix-prefetch-scripts -I nixpkgs=.
#! nix-shell -i bash -E 'with import ../../.. {}; mkShell { packages = [ bash coreutils curl jq gnused haskellPackages.cabal2nix-unstable.bin nix-prefetch-scripts (import ../../../ci {}).fmt.pkg ]; }'
# Updates cabal2nix-unstable to the latest master of the nixos/cabal2nix repository.
# See regenerate-hackage-packages.sh for details on the purpose of this script.
@@ -18,7 +18,7 @@ function mkPackage() {
output=pkgs/development/haskell-modules/cabal2nix-unstable/$1.nix
echo "# This file defines $1-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh." > "$output"
cabal2nix --subpath "$1" "https://github.com/NixOS/cabal2nix/archive/$commit.tar.gz" | sed -Ee 's/version = "(.*)"/version = "\1-unstable-'"$date"'"/' >> "$output"
nixfmt "$output"
treefmt --no-cache "$output"
}
mkPackage "cabal2nix"