Make xhtml2pdf its own package in python-packages
xhtml2pdf now uses the main package html5lib with just an override to pull the correct version number.
This commit is contained in:
parent
609374523c
commit
01c1385dec
5 changed files with 35 additions and 41 deletions
|
@ -1,10 +1,5 @@
|
|||
{lib, fetchgit, gcc, python}:
|
||||
|
||||
let
|
||||
html5 = import ./myHtml5.nix {inherit python;};
|
||||
xhtml2pdf = import ./xhtml2pdf.nix {inherit python html5;};
|
||||
in
|
||||
|
||||
python.pkgs.buildPythonApplication rec {
|
||||
name = "sasview-${version}";
|
||||
version = "4.1.2";
|
||||
|
@ -13,7 +8,6 @@ python.pkgs.buildPythonApplication rec {
|
|||
bumps
|
||||
gcc
|
||||
h5py
|
||||
html5
|
||||
libxslt
|
||||
lxml
|
||||
matplotlib
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
{python}:
|
||||
|
||||
python.pkgs.buildPythonPackage (rec{
|
||||
buildInputs = with python.pkgs; [ flake8 pytest pytest-expect mock ];
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
six webencodings
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
py.test
|
||||
'';
|
||||
pname = "html5lib";
|
||||
name = "html5lib-${version}";
|
||||
version = "1.0b10";
|
||||
src = python.pkgs.fetchPypi {
|
||||
pname = "html5lib";
|
||||
inherit version;
|
||||
sha256 = "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd";
|
||||
};
|
||||
})
|
|
@ -1,15 +0,0 @@
|
|||
{python, html5}:
|
||||
|
||||
python.pkgs.buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "xhtml2pdf";
|
||||
version = "0.2.1";
|
||||
|
||||
buildInputs = [html5];
|
||||
propagatedBuildInputs = with python.pkgs; [httplib2 pillow pypdf2 reportlab html5];
|
||||
|
||||
src = python.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1n9r8zdk9gc2x539fq60bhszmd421ipj8g78zmsn3njvma1az9k1";
|
||||
};
|
||||
}
|
33
pkgs/development/python-modules/xhtml2pdf/default.nix
Normal file
33
pkgs/development/python-modules/xhtml2pdf/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{lib, fetchPypi, buildPythonPackage, html5lib, httplib2, nose, pillow, pypdf2, reportlab}:
|
||||
|
||||
let
|
||||
#xhtml2pdf specifically requires version "1.0b10" of html5lib
|
||||
html5 = html5lib.overrideAttrs( oldAttrs: rec{
|
||||
version = "1.0b10";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "1yd068a5c00wd0ajq0hqimv7fd82lhrw0w3s01vbhy9bbd6xapqd";
|
||||
};
|
||||
});
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "xhtml2pdf";
|
||||
version = "0.2.1";
|
||||
|
||||
buildInputs = [html5];
|
||||
propagatedBuildInputs = [httplib2 nose pillow pypdf2 reportlab html5];
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "1n9r8zdk9gc2x539fq60bhszmd421ipj8g78zmsn3njvma1az9k1";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A pdf converter for the ReportLab Toolkit";
|
||||
homepage = https://github.com/xhtml2pdf/xhtml2pdf;
|
||||
license = lib.licenses.asl2;
|
||||
maintainers = with lib.maintainers; [ rprospero ];
|
||||
};
|
||||
}
|
|
@ -17902,6 +17902,8 @@ EOF
|
|||
propagatedBuildInputs = with self; [ eventlib application ];
|
||||
};
|
||||
|
||||
xhtml2pdf = callPackage ../development/python-modules/xhtml2pdf {};
|
||||
|
||||
xlib = buildPythonPackage (rec {
|
||||
name = "xlib-${version}";
|
||||
version = "0.17";
|
||||
|
|
Loading…
Reference in a new issue