about summary refs log tree commit diff
path: root/pkgs/development/python-modules/aafigure/default.nix
blob: b2a04d8ac5994307acecf5be4a5ceaa20c669cd7 (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
{ lib, buildPythonPackage, fetchPypi, pillow }:

buildPythonPackage rec {
  pname = "aafigure";
  version = "0.6";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    sha256 = "49f2c1fd2b579c1fffbac1386a2670b3f6f475cc7ff6cc04d8b984888c2d9e1e";
  };

  propagatedBuildInputs = [ pillow ];

  # error: invalid command 'test'
  doCheck = false;

  # Fix impurity. TODO: Do the font lookup using fontconfig instead of this
  # manual method. Until that is fixed, we get this whenever we run aafigure:
  #   WARNING: font not found, using PIL default font
  patchPhase = ''
    sed -i "s|/usr/share/fonts|/nonexisting-fonts-path|" aafigure/PILhelper.py
  '';

  meta = with lib; {
    description = "ASCII art to image converter";
    mainProgram = "aafigure";
    homepage = "https://launchpad.net/aafigure/";
    license = licenses.bsd2;
    maintainers = with maintainers; [ bjornfor ];
    platforms = platforms.unix;
  };
}