Home

tmpl @main - refs - log -
-
https://git.jolheiser.com/tmpl.git
Template automation
tree log patch
feat: nix nushell completions (#32) Reviewed-on: https://git.jojodev.com/jolheiser/tmpl/pulls/32 Co-authored-by: jolheiser <john.olheiser@gmail.com> Co-committed-by: jolheiser <john.olheiser@gmail.com>
jolheiser <john.olheiser@gmail.com>
1 year ago
1 changed files, 8 additions(+), 1 deletions(-)
M flake.nix -> flake.nix
diff --git a/flake.nix b/flake.nix
index 335567671849880f371015f1fce81947f075b954..92d1d5f92db75afc5c293b3549438b781d0d9eb1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,13 +8,20 @@     self,
     nixpkgs,
   }: let
     pkgs = nixpkgs.legacyPackages.x86_64-linux;
-    tmpl = pkgs.buildGoModule {
+    tmpl = pkgs.buildGoModule rec {
       pname = "tmpl";
       version = "0.4.0";
 
       src = ./.;
 
       vendorHash = "sha256-QNwzHC4fHLAhshOplKmMjRYa9sHNjBLdfBgANbs/iKk=";
+
+      ldflags = ["-s" "-w" "-X=go.jolheiser.com/tmpl/cmd.Version=${version}"];
+
+      postInstall = ''
+        mkdir -p $out/share
+        cp -vr ./contrib/tmpl-completions.nu $out/share/tmpl-completions.nu
+      '';
 
       meta = with pkgs.lib; {
         description = "";