From 2d95c8467a5c854b6e7008be71052ed87e309f09 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Thu, 12 Feb 2026 12:57:38 +0000 Subject: [PATCH] oha: Enable `checkPhase` --- pkgs/by-name/oh/oha/package.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/oh/oha/package.nix b/pkgs/by-name/oh/oha/package.nix index 9ea88a485e73..104a50e39a6a 100644 --- a/pkgs/by-name/oh/oha/package.nix +++ b/pkgs/by-name/oh/oha/package.nix @@ -3,6 +3,8 @@ rustPlatform, fetchFromGitHub, stdenv, + cacert, + libredirect, pkg-config, openssl, rust-jemalloc-sys, @@ -34,8 +36,21 @@ rustPlatform.buildRustPackage (finalAttrs: { rust-jemalloc-sys ]; - # tests don't work inside the sandbox - doCheck = false; + checkInputs = [ cacert ]; + nativeCheckInputs = [ + libredirect.hook + ]; + + preCheck = '' + echo "nameserver 127.0.0.1" > resolv.conf + export NIX_REDIRECTS="/etc/resolv.conf=$(realpath resolv.conf)" + ''; + + doCheck = true; + checkFlags = [ + "--skip=test_google" + "--skip=test_proxy" + ]; nativeInstallCheckInputs = [ versionCheckHook