wkhtmltopdf.scm 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. (define-module (wkhtmltopdf)
  2. #:use-module (guix packages)
  3. #:use-module (guix download)
  4. #:use-module (guix utils)
  5. #:use-module (guix build-system python)
  6. #:use-module ((guix licenses) #:prefix license:)
  7. #:use-module (gnu packages compression) ; zlib
  8. #:use-module (gnu packages fontutils)
  9. #:use-module (gnu packages image)
  10. #:use-module (gnu packages tls) ; openssl
  11. #:use-module (gnu packages xorg)
  12. #:use-module (srfi srfi-1))
  13. (define-public wkhtmltopdf
  14. (package
  15. (name "wkhtmltopdf")
  16. (version "0.12.4")
  17. (source (origin
  18. (method url-fetch)
  19. (uri
  20. (string-append
  21. "http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-"
  22. version ".tar.bz2"))
  23. (sha256
  24. (base32
  25. "14vvzcjgd46g0y2mq7k6ph1dz8lf9i37mw35gs0sr81jfbzyxmgd"))))
  26. (build-system python-build-system)
  27. (inputs `(("fontconfig" ,fontconfig)
  28. ("freetype" ,freetype)
  29. ("libpng" ,libpng)
  30. ("zlib" ,zlib)
  31. ("libjpeg" ,libjpeg)
  32. ("openssl" ,openssl)
  33. ("libx11" ,libx11)
  34. ("libxext" ,libxext)
  35. ("libxrender" ,libxrender)))
  36. (arguments
  37. ;;`(#:configure-flags `("setup-schroot-generic"))
  38. '(#:phases
  39. (modify-phases %standard-phases
  40. (add-before
  41. 'install
  42. (lambda* (#:key inputs #:allow-other-keys)
  43. (substitute* (list "./scripts/release.py" "./scripts/build.py")
  44. (("#!/usr/bin/env python")
  45. (string-append "#!" (which "python")))))))))
  46. ;; Meta
  47. (synopsis "Tools for rendering web pages to PDF or images")
  48. (description "wkhtmltopdf and wkhtmltoimage are open source (LGPL)
  49. command line tools to render HTML into PDF and various image formats
  50. using the QT Webkit rendering engine. These run entirely \"headless\" and
  51. do not require a display or display service.
  52. There is also a C library, if you're into that kind of
  53. thing.
  54. GUIX Specific: C library is untested")
  55. (home-page "http://wkhtmltopdf.org/")
  56. (license license:gpl3+)))