diff --git a/pkgs/by-name/te/tea/package.nix b/pkgs/by-name/te/tea/package.nix index dc76c05afd7c..f77e8190609a 100644 --- a/pkgs/by-name/te/tea/package.nix +++ b/pkgs/by-name/te/tea/package.nix @@ -4,28 +4,40 @@ fetchFromGitea, installShellFiles, stdenv, + writableTmpDirAsHomeHook, }: buildGoModule (finalAttrs: { pname = "tea"; - version = "0.11.1"; + version = "0.12.0"; src = fetchFromGitea { domain = "gitea.com"; owner = "gitea"; repo = "tea"; rev = "v${finalAttrs.version}"; - sha256 = "sha256-bphXaE5qPNzqn+PlzESZadpwbS6KryJEnL7hH/CBoTI="; + sha256 = "sha256-yaktVULY9eGRyWVqbwjZSo5d9DhHJMycfdEwZgxaLnw="; }; - vendorHash = "sha256-Y9YDwfubT+RR1v6BTFD+A8GP2ArQaIIoMJmak+Vcx88="; + vendorHash = "sha256-u4GTrdxmsfxC8s0LwQbsbky/zk1pW5VNSp4+7ZCIxzY="; ldflags = [ - "-X code.gitea.io/tea/cmd.Version=${finalAttrs.version}" + "-s" + "-w" + "-X code.gitea.io/tea/modules/version.Version=${finalAttrs.version}" + "-X code.gitea.io/tea/modules/version.Tags=nixpkgs" + "-X code.gitea.io/tea/modules/version.SDK=0.23.2" + ]; + + checkFlags = [ + # requires a git repository + "-skip=TestRepoFromPath_Worktree" ]; nativeBuildInputs = [ installShellFiles ]; + nativeCheckInputs = [ writableTmpDirAsHomeHook ]; + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd tea \ --bash <($out/bin/tea completion bash) \