bats: init libraries

- init bats-assert 2.0.0
- init bats-support 0.3.0
- init bats-file 0.3.0
This commit is contained in:
Silvan Mosberger 2022-08-08 20:10:45 +02:00
parent c80ea7da04
commit d1949b739a
2 changed files with 73 additions and 0 deletions

View file

@ -13,6 +13,7 @@
, ps
, bats
, lsof
, callPackages
, doInstallCheck ? true
}:
@ -105,6 +106,8 @@ resholve.mkDerivation rec {
};
};
passthru.libraries = callPackages ./libraries.nix {};
passthru.tests.upstream = bats.unresholved.overrideAttrs (old: {
name = "${bats.name}-tests";
dontInstall = true; # just need the build directory

View file

@ -0,0 +1,70 @@
{ lib, stdenv, fetchFromGitHub }: {
bats-assert = stdenv.mkDerivation {
pname = "bats-assert";
version = "2.0.0";
src = fetchFromGitHub {
owner = "bats-core";
repo = "bats-assert";
rev = "v2.0.0";
sha256 = "sha256-whSbAj8Xmnqclf78dYcjf1oq099ePtn4XX9TUJ9AlyQ=";
};
dontBuild = true;
installPhase = ''
mkdir -p "$out/share/bats"
cp -r . "$out/share/bats/bats-assert"
'';
meta = {
description = "Common assertions for Bats";
platforms = lib.platforms.all;
homepage = "https://github.com/bats-core/bats-assert";
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [ infinisil ];
};
};
bats-file = stdenv.mkDerivation {
pname = "bats-file";
version = "0.3.0";
src = fetchFromGitHub {
owner = "bats-core";
repo = "bats-file";
rev = "v0.3.0";
sha256 = "sha256-3xevy0QpwNZrEe+2IJq58tKyxQzYx8cz6dD2nz7fYUM=";
};
dontBuild = true;
installPhase = ''
mkdir -p "$out/share/bats"
cp -r . "$out/share/bats/bats-file"
'';
meta = {
description = "Common filesystem assertions for Bats";
platforms = lib.platforms.all;
homepage = "https://github.com/bats-core/bats-file";
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [ infinisil ];
};
};
bats-support = stdenv.mkDerivation {
pname = "bats-support";
version = "0.3.0";
src = fetchFromGitHub {
owner = "bats-core";
repo = "bats-support";
rev = "v0.3.0";
sha256 = "sha256-4N7XJS5XOKxMCXNC7ef9halhRpg79kUqDuRnKcrxoeo=";
};
dontBuild = true;
installPhase = ''
mkdir -p "$out/share/bats"
cp -r . "$out/share/bats/bats-support"
'';
meta = {
description = "Supporting library for Bats test helpers";
platforms = lib.platforms.all;
homepage = "https://github.com/bats-core/bats-support";
license = lib.licenses.cc0;
maintainers = with lib.maintainers; [ infinisil ];
};
};
}