copywrite: use `finalAttrs` pattern

+5 -5
+5 -5
pkgs/by-name/co/copywrite/package.nix
··· 12 12 commitHash = "d5bc935e4801a02fdbd953f8f0ae7989eaef50cf"; # matches tag release 13 13 shortCommitHash = builtins.substring 0 7 commitHash; 14 14 in 15 - buildGoModule rec { 15 + buildGoModule (finalAttrs: { 16 16 pname = "copywrite"; 17 17 version = "0.22.0"; 18 18 19 19 src = fetchFromGitHub { 20 20 owner = "hashicorp"; 21 21 repo = "copywrite"; 22 - tag = "v${version}"; 22 + tag = "v${finalAttrs.version}"; 23 23 hash = "sha256-gPVlHgFlLxoAj4pkg3OxD4CGQaLdAL312/Zn/pJ+7fg="; 24 24 }; 25 25 ··· 28 28 ldflags = [ 29 29 "-s" 30 30 "-w" 31 - "-X github.com/hashicorp/copywrite/cmd.version=${version}" 31 + "-X github.com/hashicorp/copywrite/cmd.version=${finalAttrs.version}" 32 32 "-X github.com/hashicorp/copywrite/cmd.commit=${shortCommitHash}" 33 33 ]; 34 34 ··· 65 65 description = "Automate copyright headers and license files at scale"; 66 66 mainProgram = "copywrite"; 67 67 homepage = "https://github.com/hashicorp/copywrite"; 68 - changelog = "https://github.com/hashicorp/copywrite/releases/tag/v${version}"; 68 + changelog = "https://github.com/hashicorp/copywrite/releases/tag/v${finalAttrs.version}"; 69 69 license = lib.licenses.mpl20; 70 70 maintainers = with lib.maintainers; [ dvcorreia ]; 71 71 }; 72 - } 72 + })