4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
38 lines
1.0 KiB
Nix
38 lines
1.0 KiB
Nix
{ lib, stdenv, buildPythonPackage, fetchFromGitHub, cairocffi, nose, fontconfig
|
|
, cssselect2, defusedxml, pillow, tinycss2 }:
|
|
|
|
# CairoSVG 2.x dropped support for Python 2 so offer CairoSVG 1.x as an
|
|
# alternative
|
|
buildPythonPackage rec {
|
|
pname = "CairoSVG";
|
|
version = "1.0.22";
|
|
|
|
# PyPI doesn't include tests so use GitHub
|
|
src = fetchFromGitHub {
|
|
owner = "Kozea";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "15z0cag5s79ghhrlgs5xc9ayvzzdr3v8151vf6k819f1drsfjfxl";
|
|
};
|
|
|
|
propagatedBuildInputs = [ cairocffi ];
|
|
|
|
checkInputs = [ nose fontconfig cssselect2 defusedxml pillow tinycss2 ];
|
|
|
|
# Almost all tests just fail. Not sure how to fix them.
|
|
doCheck = false;
|
|
|
|
# checkInputs = [ nose fontconfig cssselect2 defusedxml pillow tinycss2 ];
|
|
|
|
# checkPhase = ''
|
|
# FONTCONFIG_FILE=${fontconfig.out}/etc/fonts/fonts.conf nosetests .
|
|
# '';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://cairosvg.org";
|
|
license = licenses.lgpl3;
|
|
description = "SVG converter based on Cairo";
|
|
maintainers = with maintainers; [ jluttine ];
|
|
};
|
|
}
|