Skip to content

Commit bd383ac

Browse files
committed
python312Packages.weasyprint: cleanup
1 parent 17726ac commit bd383ac

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

pkgs/development/python-modules/weasyprint/default.nix

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,44 @@
11
{
2-
stdenv,
32
lib,
3+
stdenv,
44
pkgs,
55
buildPythonPackage,
6-
cffi,
7-
cssselect2,
8-
fetchPypi,
9-
flit-core,
6+
fetchFromGitHub,
107
fontconfig,
11-
fonttools,
128
glib,
139
harfbuzz,
1410
pango,
11+
12+
# build-system
13+
flit-core,
14+
15+
# dependencies
16+
cffi,
17+
cssselect2,
18+
fonttools,
1519
pillow,
1620
pydyf,
1721
pyphen,
22+
tinycss2,
23+
tinyhtml5,
24+
25+
# tests
1826
pytest-cov-stub,
1927
pytestCheckHook,
20-
pythonOlder,
2128
replaceVars,
22-
tinycss2,
23-
tinyhtml5,
29+
writableTmpDirAsHomeHook,
2430
}:
2531

2632
buildPythonPackage rec {
2733
pname = "weasyprint";
2834
version = "65.1";
2935
pyproject = true;
3036

31-
disabled = pythonOlder "3.9";
32-
33-
src = fetchPypi {
34-
inherit version;
35-
pname = "weasyprint";
36-
hash = "sha256-EgKBvb1C/6p9flztvjGCos7zbqWtl/6fNX5DvmoeWOo=";
37+
src = fetchFromGitHub {
38+
owner = "Kozea";
39+
repo = "WeasyPrint";
40+
tag = "v${version}";
41+
hash = "sha256-iSeuRX1dnnrGZbcb1yTxOJPD5kgIWY6oz/0v02QJqSs=";
3742
};
3843

3944
patches = [
@@ -64,6 +69,7 @@ buildPythonPackage rec {
6469
pkgs.ghostscript
6570
pytest-cov-stub
6671
pytestCheckHook
72+
writableTmpDirAsHomeHook
6773
];
6874

6975
disabledTests = [
@@ -93,11 +99,6 @@ buildPythonPackage rec {
9399
# Set env variable explicitly for Darwin, but allow overriding when invoking directly
94100
makeWrapperArgs = [ "--set-default FONTCONFIG_FILE ${FONTCONFIG_FILE}" ];
95101

96-
preCheck = ''
97-
# Fontconfig wants to create a cache.
98-
export HOME=$TMPDIR
99-
'';
100-
101102
pythonImportsCheck = [ "weasyprint" ];
102103

103104
meta = {

0 commit comments

Comments
 (0)