diff --git a/pkgs/development/interpreters/bats/default.nix b/pkgs/development/interpreters/bats/default.nix index cc57d72e8058..b9899fc229dd 100644 --- a/pkgs/development/interpreters/bats/default.nix +++ b/pkgs/development/interpreters/bats/default.nix @@ -14,6 +14,8 @@ , bats , lsof , callPackages +, symlinkJoin +, makeWrapper , doInstallCheck ? true }: @@ -108,6 +110,24 @@ resholve.mkDerivation rec { passthru.libraries = callPackages ./libraries.nix {}; + passthru.withLibraries = selector: + symlinkJoin { + name = "bats-with-libraries-${bats.version}"; + + paths = [ + bats + ] ++ selector bats.libraries; + + nativeBuildInputs = [ + makeWrapper + ]; + + postBuild = '' + wrapProgram "$out/bin/bats" \ + --suffix BATS_LIB_PATH : "$out/share/bats" + ''; + }; + passthru.tests.upstream = bats.unresholved.overrideAttrs (old: { name = "${bats.name}-tests"; dontInstall = true; # just need the build directory