build: update nix input `nixpkgs`
[haskell/symantic-parser.git] / Makefile
index 7642fc96b6121de77d3977647bd9510889fc15bf..d4bd1099f5523b5561c335f01725a8e415fb6638 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -95,9 +95,20 @@ $(project)-benchmark.prof2:
 doc:
        cabal haddock --haddock-css ocean --haddock-hyperlink-source
 
-tag:
-       git tag --merged | grep -Fqx "$(package)-$(version)" || \
-       git tag -f -s -m "$(package) v$(version)" $(package)-$(version)
+.PHONY: ChangeLog.md
+ChangeLog.md:
+       ! git tag --merged | grep -Fqx $(package)-$(version)
+       git diff --exit-code
+       git tag -f $(package)-$(version)
+       git-chglog --output $@.new --tag-filter-pattern '$(package)-.*' $(package)-$(version)
+       touch $@
+       cat $@ >>$@.new
+       mv -f $@.new $@
+       git tag -d $(package)-$(version)
+       git add '$@'
+       git commit -m 'doc: update `$@`'
+tag: ChangeLog.md
+       git tag -s -m $(package)-$(version) $(package)-$(version)
 
 tar:
        git diff --exit-code
@@ -114,21 +125,11 @@ upload: tar tag
        
 publish: upload/publish
 
-nix-build:
-       nix -L build
-nix-relock:
-       nix flake update --recreate-lock-file
-nix-repl:
-       nix -L develop --command cabal repl $(CABAL_REPL_FLAGS)
-nix-shell:
-       nix -L develop
-
 .hlint.yaml: $(shell find src -name '*.hs' -not -name 'HLint.hs')
        sed -i -e '/^# BEGIN: generated hints/,/^# END: generated hints/d' $@
        echo >>$@ '# BEGIN: generated hints'
        hlint --find . | grep -- '- fixity:' | sort -u >>$@
        echo >>$@ '# END: generated hints'
-
 lint: .hlint.yaml
        if hlint --quiet --report=hlint.html -XNoCPP $(HLINT_FLAGS) .; \
        then rm -f hlint.html; \