otel-desktop-viewer: 0.1.4 -> 0.2.2 (#418195)

authored by jade and committed by GitHub a461832e 404e43d0

+33 -22
+33 -22
pkgs/by-name/ot/otel-desktop-viewer/package.nix
··· 2 2 lib, 3 3 buildGoModule, 4 4 fetchFromGitHub, 5 - testers, 6 - otel-desktop-viewer, 5 + fetchpatch, 7 6 stdenv, 8 - apple-sdk_12, 7 + apple-sdk, 8 + versionCheckHook, 9 + nix-update-script, 10 + ... 9 11 }: 10 12 11 - buildGoModule rec { 13 + buildGoModule (finalAttrs: { 12 14 pname = "otel-desktop-viewer"; 13 - version = "0.1.4"; 15 + version = "0.2.2"; 14 16 15 17 src = fetchFromGitHub { 16 18 owner = "CtrlSpice"; 17 19 repo = "otel-desktop-viewer"; 18 - rev = "v${version}"; 19 - hash = "sha256-kMgcco4X7X9WoCCH8iZz5qGr/1dWPSeQOpruTSUnonI="; 20 + rev = "v${finalAttrs.version}"; 21 + hash = "sha256-qvMpebhbg/OnheZIZBoiitGYUUMdTghSwEapblE0DkA="; 20 22 }; 21 23 22 - # https://github.com/CtrlSpice/otel-desktop-viewer/issues/139 23 - patches = [ ./version-0.1.4.patch ]; 24 - 25 - subPackages = [ "..." ]; 26 - 27 - vendorHash = "sha256-pH16DCYeW8mdnkkRi0zqioovZu9slVc3gAdhMYu2y98="; 24 + # NOTE: This project uses Go workspaces, but 'buildGoModule' does not support 25 + # them at the time of writing; trying to build with 'env.GOWORK = "off"' 26 + # fails with the following error message: 27 + # 28 + # main module (github.com/CtrlSpice/otel-desktop-viewer) does not contain package github.com/CtrlSpice/otel-desktop-viewer/desktopexporter 29 + # 30 + # cf. https://github.com/NixOS/nixpkgs/issues/203039 31 + proxyVendor = true; 32 + vendorHash = "sha256-1TH9JQDnvhi+b3LDCAooMKgYhPudM7NCNCc+WXtcv/4="; 28 33 29 34 ldflags = [ 30 35 "-s" 31 36 "-w" 37 + "-X main.version=${finalAttrs.version}" 32 38 ]; 33 39 34 - buildInputs = lib.optional stdenv.hostPlatform.isDarwin apple-sdk_12; 40 + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk ]; 35 41 36 - passthru.tests.version = testers.testVersion { 37 - inherit version; 38 - package = otel-desktop-viewer; 39 - command = "otel-desktop-viewer --version"; 40 - }; 42 + nativeInstallCheckInputs = [ versionCheckHook ]; 43 + doInstallCheck = true; 44 + versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}"; 45 + versionCheckProgramArg = "--version"; 46 + 47 + passthru.updateScript = nix-update-script { }; 41 48 42 49 meta = { 43 - changelog = "https://github.com/CtrlSpice/otel-desktop-viewer/releases/tag/v${version}"; 50 + changelog = "https://github.com/CtrlSpice/otel-desktop-viewer/releases/tag/v${finalAttrs.version}"; 44 51 description = "Receive & visualize OpenTelemtry traces locally within one CLI tool"; 45 52 homepage = "https://github.com/CtrlSpice/otel-desktop-viewer"; 46 53 license = lib.licenses.asl20; 47 - maintainers = with lib.maintainers; [ gaelreyrol ]; 54 + maintainers = with lib.maintainers; [ 55 + gaelreyrol 56 + jkachmar 57 + lf- 58 + ]; 48 59 mainProgram = "otel-desktop-viewer"; 49 60 }; 50 - } 61 + })