summary refs log tree commit diff
path: root/pkgs/tools/misc/shellspec/default.nix
blob: 27eead6e1c3ad300ceb925f312bcf5b7cf411891 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ lib, stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "shellspec";
  version = "0.28.1";

  src = fetchFromGitHub {
    owner = "shellspec";
    repo = pname;
    rev = version;
    sha256 = "1ib5qp29f2fmivwnv6hq35qhvdxz42xgjlkvy0i3qn758riyqf46";
  };

  makeFlags = [ "PREFIX=${placeholder "out"}" ];

  checkPhase = ''
    ./shellspec --no-banner --task fixture:stat:prepare
    ./shellspec --no-banner spec --jobs "$(nproc)"
  '';

  # "Building" the script happens in Docker
  dontBuild = true;

  meta = with lib; {
    description =
      "A full-featured BDD unit testing framework for bash, ksh, zsh, dash and all POSIX shells";
    homepage = "https://shellspec.info/";
    changelog =
      "https://github.com/shellspec/shellspec/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ j0hax ];
    platforms = platforms.unix;
  };
}