docs: add man page to nix

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2023-11-13 21:32:57 -06:00
parent dd2bc75dac
commit 72352f984f
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
2 changed files with 32 additions and 0 deletions

View File

@ -30,6 +30,13 @@
doCheck = false;
nativeBuildInputs = [pkgs.installShellFiles];
preInstall = ''
go run man.go
installManPage git-age.1
'';
meta = with pkgs.lib; {
description = "";
homepage = "https://git.jojodev.com/jolheiser/git-age";

25
man.go 100644
View File

@ -0,0 +1,25 @@
//go:build man
package main
import (
"os"
"go.jolheiser.com/git-age/cmd"
)
func main() {
fi, err := os.Create("git-age.1")
if err != nil {
panic(err)
}
defer fi.Close()
app := cmd.New()
man, err := app.ToMan()
if err != nil {
panic(err)
}
fi.WriteString(man)
}