From 50c4f70db16b5a3215c3a10caf2c27ea73ff0ab8 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 3 Dec 2024 17:09:36 +0100 Subject: [PATCH] testers.hasPkgConfigModules: Shorten derivation name Overly long names are annoying, and grab attention that these tests usually don't need. Keep it short and sweet. --- .../testers/hasPkgConfigModules/tester.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/testers/hasPkgConfigModules/tester.nix b/pkgs/build-support/testers/hasPkgConfigModules/tester.nix index 3d4ded812f75..375599d813fa 100644 --- a/pkgs/build-support/testers/hasPkgConfigModules/tester.nix +++ b/pkgs/build-support/testers/hasPkgConfigModules/tester.nix @@ -1,10 +1,20 @@ # Static arguments { lib, runCommand, pkg-config }: +let + genTestName = moduleNames: + # An overly long name made the progress bar weird and distraction, and same + # for the build log prefix. + if lib.length moduleNames > 1 then + "modules" + else + lib.head moduleNames; +in + # Tester arguments { package, moduleNames ? package.meta.pkgConfigModules, - testName ? "check-pkg-config-${lib.concatStringsSep "-" moduleNames}", + testName ? "check-pkg-config-${genTestName moduleNames}", version ? package.version or null, versionCheck ? false, }: