blob: 4eb1c961834b9f49fbaf008470054dc215f1cfa5 (
plain)
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
35
36
37
38
39
40
41
|
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
pillow,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "aafigure";
version = "0.6";
pyproject = true;
src = fetchPypi {
inherit (finalAttrs) pname version;
hash = "sha256-SfLB/StXnB//usE4aiZws/b0dcx/9swE2LmEiIwtnh4=";
};
build-system = [ setuptools ];
propagatedBuildInputs = [ pillow ];
nativeCheckInputs = [ pytestCheckHook ];
# 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 = {
description = "ASCII art to image converter";
mainProgram = "aafigure";
homepage = "https://launchpad.net/aafigure/";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ bjornfor ];
platforms = lib.platforms.unix;
};
})
|