1{stdenv, lib, buildPythonPackage, fetchPypi, bash, which}:
2
3buildPythonPackage rec {
4 version = "0.7";
5 pname = "cram";
6
7 nativeCheckInputs = [ which ];
8
9 src = fetchPypi {
10 inherit pname version;
11 sha256 = "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx";
12 };
13
14 postPatch = ''
15 patchShebangs scripts/cram
16 substituteInPlace tests/test.t \
17 --replace "/bin/bash" "${bash}/bin/bash"
18 '';
19
20 checkPhase = ''
21 scripts/cram tests
22 '';
23
24 meta = {
25 description = "A simple testing framework for command line applications";
26 homepage = "https://bitheap.org/cram/";
27 license = lib.licenses.gpl2Plus;
28 maintainers = with lib.maintainers; [ jluttine ];
29 # Tests fail on i686: https://hydra.nixos.org/build/52896671/nixlog/4
30 broken = stdenv.isi686;
31 };
32}