From d4476dc609a4469418d958d8ab33c85b90ead4a1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 25 May 2024 15:50:54 +0200 Subject: [PATCH] uv: add sanity check to prevent missing regressions --- pkgs/by-name/uv/uv/package.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/uv/uv/package.nix b/pkgs/by-name/uv/uv/package.nix index 282e57f9d585..1e1d4fc10065 100644 --- a/pkgs/by-name/uv/uv/package.nix +++ b/pkgs/by-name/uv/uv/package.nix @@ -9,6 +9,8 @@ , python3Packages , rustPlatform , stdenv +, testers +, uv , nix-update-script }: @@ -20,7 +22,7 @@ python3Packages.buildPythonApplication rec { src = fetchFromGitHub { owner = "astral-sh"; repo = "uv"; - rev = version; + rev = "refs/tags/${version}"; hash = "sha256-NwIjuOsf6tv+kVEXA2GvQkVwDznZs5fnnkzcnVoOGpY="; }; @@ -51,9 +53,6 @@ python3Packages.buildPythonApplication rec { cargoBuildFlags = [ "--package" "uv" ]; - # Tests require network access - doCheck = false; - env = { OPENSSL_NO_VENDOR = true; }; @@ -70,14 +69,19 @@ python3Packages.buildPythonApplication rec { "uv" ]; - passthru.updateScript = nix-update-script { }; + passthru = { + tests.version = testers.testVersion { + package = uv; + }; + updateScript = nix-update-script { }; + }; - meta = with lib; { + meta = { description = "An extremely fast Python package installer and resolver, written in Rust"; homepage = "https://github.com/astral-sh/uv"; changelog = "https://github.com/astral-sh/uv/blob/${src.rev}/CHANGELOG.md"; - license = with licenses; [ asl20 mit ]; - maintainers = with maintainers; [ GaetanLepage ]; + license = with lib.licenses; [ asl20 mit ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; mainProgram = "uv"; }; }