mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-30 16:10:36 +00:00
maintainers/haskell: format with treefmt config
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user