From 81618d1a820f25a42766ad0ae40877f96755f09e Mon Sep 17 00:00:00 2001 From: Thomas Zahner Date: Thu, 23 Oct 2025 16:14:24 +0200 Subject: [PATCH] lychee: 0.20.1 -> 0.21.0 --- pkgs/by-name/ly/lychee/package.nix | 31 +++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/ly/lychee/package.nix b/pkgs/by-name/ly/lychee/package.nix index d2139a8f023c..44daa281a8ef 100644 --- a/pkgs/by-name/ly/lychee/package.nix +++ b/pkgs/by-name/ly/lychee/package.nix @@ -1,30 +1,48 @@ { callPackage, lib, - rustPlatform, + stdenv, + buildPackages, fetchFromGitHub, + rustPlatform, + installShellFiles, pkg-config, + git, openssl, testers, }: +let + canRun = stdenv.hostPlatform.emulatorAvailable buildPackages; + lychee = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/lychee${stdenv.hostPlatform.extensions.executable}"; +in rustPlatform.buildRustPackage rec { pname = "lychee"; - version = "0.20.1"; + version = "0.21.0"; src = fetchFromGitHub { owner = "lycheeverse"; repo = "lychee"; rev = "lychee-v${version}"; - hash = "sha256-yHIj45RfQch4y+V4Ht7cDMcg5MECejxsbjuE345I/to="; + hash = "sha256-zV3EVFFYU9fR5gXPTyYudE8rgAW3eDjOF3sTJMuXzh4="; + leaveDotGit = true; # used by lychee to determine latest commit date at build time }; - cargoHash = "sha256-d3umjtXPBJbPRtNCuktYhJUPgKFmB8UEeewWMekDZRE="; + cargoHash = "sha256-1sqFjNil6KktpqrsXXgt3xtOz7eFQc2skkFHqmTMDg4="; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + git + installShellFiles + ]; buildInputs = [ openssl ]; + postFixup = lib.optionalString canRun '' + ${lychee} --generate man > lychee.1 + installManPage lychee.1 + ''; + cargoTestFlags = [ # don't run doctests since they tend to use the network "--lib" @@ -32,6 +50,8 @@ rustPlatform.buildRustPackage rec { "--tests" ]; + checkType = "debug"; # compilation fails otherwise + checkFlags = [ # Network errors for all of these tests # "error reading DNS system conf: No such file or directory (os error 2)" } } @@ -44,6 +64,7 @@ rustPlatform.buildRustPackage rec { "--skip=cli::test_local_file" "--skip=client::tests" "--skip=collector::tests" + "--skip=commands::generate::tests::test_examples_work" "--skip=src/lib.rs" # Color error for those tests as we are not in a tty "--skip=formatters::response::color::tests::test_format_response_with_error_status"