Migrate rst2pdf to callPackage
More or less in order to have a show case and working example. There is no huge benefit in that case. But it demonstrates that a default.nix could call callPackage and benefit from 1:1 copy of nixpkgs package definition. Also eases debugging of the derivation / package.
This commit is contained in:
parent
bf40d77b92
commit
1804902632
|
@ -1,34 +1,3 @@
|
|||
self: super: {
|
||||
rst2pdf = super.pkgs.python3.pkgs.buildPythonApplication rec {
|
||||
pname = "rst2pdf";
|
||||
version = "0.99";
|
||||
|
||||
src = super.pkgs.python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "8fa23fa93bddd1f52d058ceaeab6582c145546d80f2f8a95974f3703bd6c8152";
|
||||
};
|
||||
|
||||
# We do not install extras, and tests for extras might fail
|
||||
# Extras are sphinx, plantuml, …
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with super.pkgs.python3.pkgs; [
|
||||
docutils
|
||||
importlib-metadata
|
||||
jinja2
|
||||
packaging
|
||||
pygments
|
||||
pyyaml
|
||||
reportlab
|
||||
smartypants
|
||||
|
||||
pillow
|
||||
];
|
||||
|
||||
meta = with super.lib; {
|
||||
description = "Convert reStructured Text to PDF via ReportLab.";
|
||||
homepage = "https://rst2pdf.org/";
|
||||
license = licenses.mit;
|
||||
};
|
||||
};
|
||||
rst2pdf = self.callPackage ./rst2pdf.nix { };
|
||||
}
|
||||
|
|
34
overlays/rst2pdf/rst2pdf.nix
Normal file
34
overlays/rst2pdf/rst2pdf.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ python3, lib }:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "rst2pdf";
|
||||
version = "0.99";
|
||||
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "8fa23fa93bddd1f52d058ceaeab6582c145546d80f2f8a95974f3703bd6c8152";
|
||||
};
|
||||
|
||||
# We do not install extras, and tests for extras might fail
|
||||
# Extras are sphinx, plantuml, …
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
docutils
|
||||
importlib-metadata
|
||||
jinja2
|
||||
packaging
|
||||
pygments
|
||||
pyyaml
|
||||
reportlab
|
||||
smartypants
|
||||
|
||||
pillow
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Convert reStructured Text to PDF via ReportLab.";
|
||||
homepage = "https://rst2pdf.org/";
|
||||
license = licenses.mit;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue