diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 480040afee66..205541b186b1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -2673,6 +2673,13 @@ githubId = 1071610; name = "Gunnar Nitsche"; }; + brokenpip3 = { + email = "brokenpip3@gmail.com"; + matrix = "@brokenpip3:matrix.org"; + github = "brokenpip3"; + githubId = 40476330; + name = "brokenpip3"; + }; bryanasdev000 = { email = "bryanasdev000@gmail.com"; matrix = "@bryanasdev000:matrix.org"; diff --git a/pkgs/development/interpreters/bats/default.nix b/pkgs/development/interpreters/bats/default.nix index 4953daf7109c..afffef1d1f68 100644 --- a/pkgs/development/interpreters/bats/default.nix +++ b/pkgs/development/interpreters/bats/default.nix @@ -140,6 +140,7 @@ resholve.mkDerivation rec { bats_load_library bats-support bats_load_library bats-assert bats_load_library bats-file + bats_load_library bats-detik/detik.bash bats_require_minimum_version 1.5.0 @@ -170,7 +171,7 @@ resholve.mkDerivation rec { ''; passAsFile = [ "testScript" ]; } '' - ${bats.withLibraries (p: [ p.bats-support p.bats-assert p.bats-file ])}/bin/bats "$testScriptPath" + ${bats.withLibraries (p: [ p.bats-support p.bats-assert p.bats-file p.bats-detik ])}/bin/bats "$testScriptPath" touch "$out" ''; diff --git a/pkgs/development/interpreters/bats/libraries.nix b/pkgs/development/interpreters/bats/libraries.nix index 9e60a4dc992c..a7d5e2b87747 100644 --- a/pkgs/development/interpreters/bats/libraries.nix +++ b/pkgs/development/interpreters/bats/libraries.nix @@ -1,18 +1,20 @@ { lib, stdenv, fetchFromGitHub }: { - bats-assert = stdenv.mkDerivation rec { + bats-assert = stdenv.mkDerivation (finalAttrs: { pname = "bats-assert"; version = "2.1.0"; src = fetchFromGitHub { owner = "bats-core"; repo = "bats-assert"; - rev = "v${version}"; - sha256 = "sha256-opgyrkqTwtnn/lUjMebbLfS/3sbI2axSusWd5i/5wm4="; + rev = "v${finalAttrs.version}"; + hash = "sha256-opgyrkqTwtnn/lUjMebbLfS/3sbI2axSusWd5i/5wm4="; }; dontBuild = true; installPhase = '' + runHook preInstall mkdir -p "$out/share/bats/bats-assert" cp load.bash "$out/share/bats/bats-assert" cp -r src "$out/share/bats/bats-assert" + runHook postInstall ''; meta = { description = "Common assertions for Bats"; @@ -21,22 +23,24 @@ license = lib.licenses.cc0; maintainers = with lib.maintainers; [ infinisil ]; }; - }; + }); - bats-file = stdenv.mkDerivation rec { + bats-file = stdenv.mkDerivation (finalAttrs: { pname = "bats-file"; - version = "0.3.0"; + version = "0.4.0"; src = fetchFromGitHub { owner = "bats-core"; repo = "bats-file"; - rev = "v${version}"; - sha256 = "sha256-3xevy0QpwNZrEe+2IJq58tKyxQzYx8cz6dD2nz7fYUM="; + rev = "v${finalAttrs.version}"; + hash = "sha256-NJzpu1fGAw8zxRKFU2awiFM2Z3Va5WONAD2Nusgrf4o="; }; dontBuild = true; installPhase = '' + runHook preInstall mkdir -p "$out/share/bats/bats-file" cp load.bash "$out/share/bats/bats-file" cp -r src "$out/share/bats/bats-file" + runHook postInstall ''; meta = { description = "Common filesystem assertions for Bats"; @@ -45,22 +49,49 @@ license = lib.licenses.cc0; maintainers = with lib.maintainers; [ infinisil ]; }; - }; + }); - bats-support = stdenv.mkDerivation rec { + bats-detik = stdenv.mkDerivation (finalAttrs: { + pname = "bats-detik"; + version = "1.2.1"; + src = fetchFromGitHub { + owner = "bats-core"; + repo = "bats-detik"; + rev = "v${finalAttrs.version}"; + hash = "sha256-2BEIqRSc21oPjd9BgTLg5mGyAdNJYA2b7gZe7Nj2dks="; + }; + dontBuild = true; + installPhase = '' + runHook preInstall + mkdir -p "$out/share/bats/bats-detik" + cp -r lib/* "$out/share/bats/bats-detik" + runHook postInstall + ''; + meta = { + description = "Library to ease e2e tests of applications in K8s environments"; + platforms = lib.platforms.all; + homepage = "https://github.com/bats-core/bats-detik"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ brokenpip3 ]; + }; + }); + + bats-support = stdenv.mkDerivation (finalAttrs: { pname = "bats-support"; version = "0.3.0"; src = fetchFromGitHub { owner = "bats-core"; repo = "bats-support"; - rev = "v${version}"; - sha256 = "sha256-4N7XJS5XOKxMCXNC7ef9halhRpg79kUqDuRnKcrxoeo="; + rev = "v${finalAttrs.version}"; + hash = "sha256-4N7XJS5XOKxMCXNC7ef9halhRpg79kUqDuRnKcrxoeo="; }; dontBuild = true; installPhase = '' + runHook preInstall mkdir -p "$out/share/bats/bats-support" cp load.bash "$out/share/bats/bats-support" cp -r src "$out/share/bats/bats-support" + runHook postInstall ''; meta = { description = "Supporting library for Bats test helpers"; @@ -69,5 +100,5 @@ license = lib.licenses.cc0; maintainers = with lib.maintainers; [ infinisil ]; }; - }; + }); }