From f37ff13bde49edfce5a2ec3d7c0050114ec535ff Mon Sep 17 00:00:00 2001 From: jolheiser Date: Fri, 22 Dec 2023 13:43:40 -0600 Subject: [PATCH] feat: nix nushell completions Signed-off-by: jolheiser --- flake.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 3355676..92d1d5f 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ nixpkgs, }: let pkgs = nixpkgs.legacyPackages.x86_64-linux; - tmpl = pkgs.buildGoModule { + tmpl = pkgs.buildGoModule rec { pname = "tmpl"; version = "0.4.0"; @@ -16,6 +16,13 @@ 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 = ""; homepage = "https://git.jojodev.com/jolheiser/tmpl";