From 00c59b747738e51c822c61807ded0da17d4db62c Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 16:52:34 +0100 Subject: [PATCH 1/8] sentry-cli: apply fix-swift-lib-path patch only on darwin --- pkgs/by-name/se/sentry-cli/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index ac1c66aca115..a0cb8d43f787 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -25,10 +25,8 @@ rustPlatform.buildRustPackage rec { # Needed to get openssl-sys to use pkgconfig. OPENSSL_NO_VENDOR = 1; - patches = [ - (replaceVars ./fix-swift-lib-path.patch { - swiftLib = lib.getLib swift; - }) + patches = lib.optionals stdenv.hostPlatform.isDarwin [ + (replaceVars ./fix-swift-lib-path.patch { swiftLib = lib.getLib swift; }) ]; buildInputs = [ openssl ]; From e754e8589673c91a0c69d3e2a6a0c214344493d7 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 17:05:46 +0100 Subject: [PATCH 2/8] sentry-cli: use finalAttrs pattern --- pkgs/by-name/se/sentry-cli/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index a0cb8d43f787..bdde039f70c0 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -10,14 +10,15 @@ swiftpm, replaceVars, }: -rustPlatform.buildRustPackage rec { + +rustPlatform.buildRustPackage (finalAttrs: { pname = "sentry-cli"; version = "2.58.0"; src = fetchFromGitHub { owner = "getsentry"; repo = "sentry-cli"; - rev = version; + rev = finalAttrs.version; hash = "sha256-8fz8bSQxqylTQ7mD/QbQ6gc8qlEdx/SDCjaB3uqFnGA="; }; doCheck = false; @@ -56,7 +57,7 @@ rustPlatform.buildRustPackage rec { license = lib.licenses.bsd3; description = "Command line utility to work with Sentry"; mainProgram = "sentry-cli"; - changelog = "https://github.com/getsentry/sentry-cli/raw/${version}/CHANGELOG.md"; + changelog = "https://github.com/getsentry/sentry-cli/raw/${finalAttrs.version}/CHANGELOG.md"; maintainers = with lib.maintainers; [ rizary ]; }; -} +}) From 4678086c6e3f81790f9eff533a548f1588fe6343 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 17:06:16 +0100 Subject: [PATCH 3/8] sentry-cli: use tag in fetchFromGitHub --- pkgs/by-name/se/sentry-cli/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index bdde039f70c0..9581aae333eb 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -18,7 +18,7 @@ rustPlatform.buildRustPackage (finalAttrs: { src = fetchFromGitHub { owner = "getsentry"; repo = "sentry-cli"; - rev = finalAttrs.version; + tag = finalAttrs.version; hash = "sha256-8fz8bSQxqylTQ7mD/QbQ6gc8qlEdx/SDCjaB3uqFnGA="; }; doCheck = false; From 0073044d492b5190725a303434def9de3a2f5903 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 17:46:08 +0100 Subject: [PATCH 4/8] sentry-cli: enable tests --- pkgs/by-name/se/sentry-cli/package.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index 9581aae333eb..95e3ffcc5e2b 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -9,6 +9,7 @@ swift, swiftpm, replaceVars, + gitMinimal, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -21,7 +22,6 @@ rustPlatform.buildRustPackage (finalAttrs: { tag = finalAttrs.version; hash = "sha256-8fz8bSQxqylTQ7mD/QbQ6gc8qlEdx/SDCjaB3uqFnGA="; }; - doCheck = false; # Needed to get openssl-sys to use pkgconfig. OPENSSL_NO_VENDOR = 1; @@ -31,6 +31,7 @@ rustPlatform.buildRustPackage (finalAttrs: { ]; buildInputs = [ openssl ]; + nativeBuildInputs = [ installShellFiles pkg-config @@ -40,8 +41,18 @@ rustPlatform.buildRustPackage (finalAttrs: { swiftpm ]); + nativeCheckInputs = [ gitMinimal ]; + + checkFlags = [ + "--skip=integration::send_metric::command_send_metric" + "--skip=integration::update::command_update" + ]; + # By default including `swiftpm` in `nativeBuildInputs` will take over `buildPhase` dontUseSwiftpmBuild = true; + dontUseSwiftpmCheck = true; + + __darwinAllowLocalNetworking = true; cargoHash = "sha256-3I0uKHpD4SpSeLSIAEjBxxAFfyS4WIvb76x7QAy53HM="; From 5a1fa2371ec286991323a2a22c5fab3bf00e1ec0 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 17:50:03 +0100 Subject: [PATCH 5/8] sentry-cli: add updateScript --- pkgs/by-name/se/sentry-cli/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index 95e3ffcc5e2b..d28e01fd0c1d 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -10,6 +10,7 @@ swiftpm, replaceVars, gitMinimal, + nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { @@ -63,6 +64,8 @@ rustPlatform.buildRustPackage (finalAttrs: { --zsh <($out/bin/sentry-cli completions zsh) ''; + passthru.updateScript = nix-update-script { }; + meta = { homepage = "https://docs.sentry.io/cli/"; license = lib.licenses.bsd3; From 0c431a2d61dc0c1628aeac497a4b2e0cacb0f119 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 17:50:20 +0100 Subject: [PATCH 6/8] sentry-cli: add versionCheckHook --- pkgs/by-name/se/sentry-cli/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index d28e01fd0c1d..5c2583140d5e 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -10,6 +10,7 @@ swiftpm, replaceVars, gitMinimal, + versionCheckHook, nix-update-script, }: @@ -64,6 +65,10 @@ rustPlatform.buildRustPackage (finalAttrs: { --zsh <($out/bin/sentry-cli completions zsh) ''; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + passthru.updateScript = nix-update-script { }; meta = { From abebc574a532c61f31b5e065fa3c432f3db94938 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 17:52:12 +0100 Subject: [PATCH 7/8] sentry-cli: reorder attributes --- pkgs/by-name/se/sentry-cli/package.nix | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index 5c2583140d5e..ac2ce6ec1b52 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -25,30 +25,14 @@ rustPlatform.buildRustPackage (finalAttrs: { hash = "sha256-8fz8bSQxqylTQ7mD/QbQ6gc8qlEdx/SDCjaB3uqFnGA="; }; - # Needed to get openssl-sys to use pkgconfig. - OPENSSL_NO_VENDOR = 1; - patches = lib.optionals stdenv.hostPlatform.isDarwin [ (replaceVars ./fix-swift-lib-path.patch { swiftLib = lib.getLib swift; }) ]; - buildInputs = [ openssl ]; + cargoHash = "sha256-3I0uKHpD4SpSeLSIAEjBxxAFfyS4WIvb76x7QAy53HM="; - nativeBuildInputs = [ - installShellFiles - pkg-config - ] - ++ (lib.optionals stdenv.hostPlatform.isDarwin [ - swift - swiftpm - ]); - - nativeCheckInputs = [ gitMinimal ]; - - checkFlags = [ - "--skip=integration::send_metric::command_send_metric" - "--skip=integration::update::command_update" - ]; + # Needed to get openssl-sys to use pkgconfig. + env.OPENSSL_NO_VENDOR = 1; # By default including `swiftpm` in `nativeBuildInputs` will take over `buildPhase` dontUseSwiftpmBuild = true; @@ -56,7 +40,23 @@ rustPlatform.buildRustPackage (finalAttrs: { __darwinAllowLocalNetworking = true; - cargoHash = "sha256-3I0uKHpD4SpSeLSIAEjBxxAFfyS4WIvb76x7QAy53HM="; + nativeBuildInputs = [ + installShellFiles + pkg-config + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + swift + swiftpm + ]; + + buildInputs = [ openssl ]; + + nativeCheckInputs = [ gitMinimal ]; + + checkFlags = [ + "--skip=integration::send_metric::command_send_metric" + "--skip=integration::update::command_update" + ]; postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' installShellCompletion --cmd sentry-cli \ From 5cbc51fd0fa46a3f95d857b60ecbcbd505329008 Mon Sep 17 00:00:00 2001 From: Defelo Date: Thu, 20 Nov 2025 16:53:39 +0000 Subject: [PATCH 8/8] sentry-cli: 2.58.0 -> 2.58.2 Changelog: https://github.com/getsentry/sentry-cli/raw/2.58.2/CHANGELOG.md Diff: https://github.com/getsentry/sentry-cli/compare/2.58.0...2.58.2 --- pkgs/by-name/se/sentry-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/se/sentry-cli/package.nix b/pkgs/by-name/se/sentry-cli/package.nix index ac2ce6ec1b52..52a9b1f73252 100644 --- a/pkgs/by-name/se/sentry-cli/package.nix +++ b/pkgs/by-name/se/sentry-cli/package.nix @@ -16,20 +16,20 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "sentry-cli"; - version = "2.58.0"; + version = "2.58.2"; src = fetchFromGitHub { owner = "getsentry"; repo = "sentry-cli"; tag = finalAttrs.version; - hash = "sha256-8fz8bSQxqylTQ7mD/QbQ6gc8qlEdx/SDCjaB3uqFnGA="; + hash = "sha256-2dxnAwxIdmeA53PETUyDUgi1T4ZH9faBvPCMdRPUDxw="; }; patches = lib.optionals stdenv.hostPlatform.isDarwin [ (replaceVars ./fix-swift-lib-path.patch { swiftLib = lib.getLib swift; }) ]; - cargoHash = "sha256-3I0uKHpD4SpSeLSIAEjBxxAFfyS4WIvb76x7QAy53HM="; + cargoHash = "sha256-CwULTOZN2TTpB8heLuegID38ub6J3XoiY7l7UW1VcGo="; # Needed to get openssl-sys to use pkgconfig. env.OPENSSL_NO_VENDOR = 1;