1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-07 09:31:04 +01:00
home-manager/Makefile
awwpotato 3f591550a9
formatter: remove script, add treefmt.toml + keep-sorted (#7056)
currently ./format does a bunch of stuff with git that was only necessary for nixfmt but not nixfmt-tree, so I deleted it (just use treefmt command directly instead). I also added keep sorted to keep the really long module lists sorted (already used in nixpkgs).
2025-05-20 12:42:51 -05:00

20 lines
557 B
Makefile

.PHONY: all all-tests test test-install format
NIXPKGS_REV := nixpkgs-unstable
NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/${NIXPKGS_REV}.tar.gz
all: all-tests test-install
all-tests:
$(MAKE) test TEST=all
test:
ifndef TEST
$(error Use 'make test TEST=<test_name>' to run desired test)
endif
nix-shell --pure tests -I ${NIX_PATH} -A run.${TEST}
test-install:
HOME=$(shell mktemp -d) NIX_PATH=${NIX_PATH} nix-shell . -A install
format:
nix-shell -p treefmt nixfmt-rfc-style keep-sorted --run "treefmt --config-file ./treefmt.toml"