6 , sharnessExtensions ? {} }:
8 stdenv.mkDerivation (finalAttrs: {
12 src = fetchFromGitHub {
15 rev = "v${finalAttrs.version}";
16 hash = "sha256-C0HVWgTm9iXDSFyXcUVRfT0ip31YGaaZ6ZvxggK/x7o=";
20 nativeBuildInputs = [ perl perlPackages.IOTty ];
22 outputs = [ "out" "doc" ];
24 makeFlags = [ "prefix=$(out)" ];
26 extensions = lib.mapAttrsToList (k: v: "${k}.sh ${v}") sharnessExtensions;
28 postInstall = lib.optionalString (sharnessExtensions != {}) ''
29 extDir=$out/share/sharness/sharness.d
33 while [ $# -ge 2 ]; do
34 ln -s "$2" "$extDir/$1"
43 passthru.SHARNESS_TEST_SRCDIR = finalAttrs.finalPackage + "/share/sharness";
46 description = "Portable shell library to write, run and analyze automated tests adhering to Test Anything Protocol (TAP)";
47 homepage = "https://github.com/chriscool/sharness";
48 license = licenses.gpl2Only;
49 maintainers = [ maintainers.spacefrogg ];
50 platforms = platforms.unix;