Home

git-age @main - refs - log -
-
https://git.jolheiser.com/git-age.git
git-crypt, but with age
tree log patch
docs: add man page to nix Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signature
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEgqEQpE3xoo1QwJO/uFOtpdp7v3oFAmVS6mkACgkQuFOtpdp7 v3qRMA//TFLOjERAtUQIYG+syWNm8dlUJ6evpTgx2dMOgi+BDjxWOpOW3539K6NL cBdvYp8Pm/2DcSKEK71yZ6Gq6liVhM7wDVCRhCaZOGifil3fmxQVtST2ZKP4vqzJ 3rX/aR9uSO1hH4iF+CNYpuw7c/LYYPOTXTq2YEGpIOVYtoAEVdh/nQ98MYnKPNmf OKkwYs44miYe1jCpr+GqZCaUMOENHkKOHFuiogfnMoTMnRAvKmpCIV0E1rECoLfg yDM2rrCFr/Vak8OCK7pgJWIM4sBy/DRdZIzoqq3zQvN2QhChIXJMzme6sNOfAOEm m4ieCOw/kYNxyUI9wpk55ZeRUouTqyHPKhx8WJEWLOEFhYoHkNBZimEJhWks1TIO dlOPTu82UTV2MCaumxq2mDFU7bqFQKUEHRQpUBSZDRP7ybx9krLF1bgekPNyg5Sr MIy5+knciFcO3W5+7BWdNVZrXtOgFe4P4udv/b7rNMWoAZ5cASbph3rhLvl8r4Hm hmO5FktvXsYYlcEjvUX23HxqJllPJMq6ZsD4A5F6WCy9h6uZvgebC/bHkRzGjI56 DHOTswcHkOBOce0bJukejD7kwU8HknsjOM+WMhB7s4TUMjbGpE/CER49G4LtaNZR YbO/xJ13ujbChe//B2jkY42WNe0iKCziy89MOMuwaVN8L8IJnpg= =rXbJ -----END PGP SIGNATURE-----
jolheiser <john.olheiser@gmail.com>
1 year ago
2 changed files, 32 additions(+), 0 deletions(-)
M flake.nix -> flake.nix
diff --git a/flake.nix b/flake.nix
index 567f4b5525f6ee063c60da1f8e075763fd8399d8..9846d7f9b4ea065bb775731b6c54856a9c3505b2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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";
I man.go
diff --git a/man.go b/man.go
new file mode 100644
index 0000000000000000000000000000000000000000..15ff69a7cf57bd32846c52d6e4836e8a4520cb80
--- /dev/null
+++ b/man.go
@@ -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)
+}