about summary refs log tree commit diff
path: root/pkgs/tools/misc/asciinema/default.nix
blob: 4b228efee9e1f8f2c1c1d2c37eb62b0f7a2b3791 (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, python3Packages, fetchFromGitHub }:

let
  pythonPackages = python3Packages;
in pythonPackages.buildPythonApplication rec {
  name = "asciinema-${version}";
  version = "1.4.0";

  buildInputs = with pythonPackages; [ nose ];
  propagatedBuildInputs = with pythonPackages; [ requests2 ];

  src = fetchFromGitHub {
    owner = "asciinema";
    repo = "asciinema";
    rev = "v${version}";
    sha256 = "1m2gjqxb5gqyz19lvp7jmwp7cxjc6nb0b2rrlsg3z2bl6vmi1xn2";
  };

  patchPhase = ''
    # disable one test which is failing with -> OSError: out of pty devices
    rm tests/pty_recorder_test.py
  '';

  checkPhase = ''
    nosetests
  '';

  meta = {
    description = "Terminal session recorder and the best companion of asciinema.org";
    homepage = https://asciinema.org/;
    license = with lib.licenses; [ gpl3 ];
  };
}