Commit 50c4f70d authored by Robert Hensing's avatar Robert Hensing Committed by sternenseemann
Browse files

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.
parent 15571147
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
# 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,
}: