summary refs log tree commit diff
path: root/pkgs/shells/fish/plugins/fishtape.nix
blob: 82f2375d5e3f876e562d2ee841f30035282a66ae (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
{ lib, buildFishPlugin, fetchFromGitHub }:

buildFishPlugin rec {
  pname = "fishtape";
  version = "2.1.3";

  src = fetchFromGitHub {
    owner = "jorgebucaran";
    repo = "fishtape";
    rev = version;
    sha256 = "0dxcyhs2shhgy5xnwcimqja8vqsyk841x486lgq13i3y1h0kp2kd";
  };

  checkFunctionDirs = [ "./" ]; # fishtape is introspective
  checkPhase = ''
    rm test/tty.fish  # test expects a tty
    fishtape test/*.fish
  '';

  preInstall = ''
    # move the function script in the proper sub-directory
    mkdir functions
    mv fishtape.fish functions/
  '';

  meta = {
    description = "TAP-based test runner for Fish";
    homepage = "https://github.com/jorgebucaran/fishtape";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pacien ];
  };
}