From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47703) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7LB6-0004Qm-0q for guix-patches@gnu.org; Mon, 09 Sep 2019 11:02:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7LB4-0008Uc-G4 for guix-patches@gnu.org; Mon, 09 Sep 2019 11:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i7LB4-0008UN-9y for guix-patches@gnu.org; Mon, 09 Sep 2019 11:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i7LB4-0000BB-3S for guix-patches@gnu.org; Mon, 09 Sep 2019 11:02:02 -0400 Subject: [bug#37356] [PATCH] gnu: Add stapler. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:47520) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i7LAU-0004Iy-Hn for guix-patches@gnu.org; Mon, 09 Sep 2019 11:01:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i7LAQ-00087D-1a for guix-patches@gnu.org; Mon, 09 Sep 2019 11:01:25 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:35606) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i7LAN-000825-Es for guix-patches@gnu.org; Mon, 09 Sep 2019 11:01:20 -0400 From: Arun Isaac Date: Mon, 9 Sep 2019 20:31:00 +0530 Message-Id: <20190909150100.20014-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37356@debbugs.gnu.org * gnu/packages/pdf.scm (stapler): New variable. --- gnu/packages/pdf.scm | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index d45a78222c..af915422de 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2016, 2017 Marius Bakke ;;; Copyright © 2016, 2017 Ludovic Courtès ;;; Copyright © 2016 Julien Lepiller -;;; Copyright © 2016 Arun Isaac +;;; Copyright © 2016, 2019 Arun Isaac ;;; Copyright © 2017, 2018 Leo Famulari ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017, 2018 Rene Saavedra @@ -1116,3 +1116,37 @@ presentation. The input files processed by pdfpc are PDF documents.") rendering of the file. The rendering is done by creating outline curves through the Pango @code{ft2} backend.") (license license:lgpl2.0+)))) + +(define-public stapler + (package + (name "stapler") + (version "0.3.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/hellerbarde/stapler") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "06w7xanzr7cicqik62g7zqs57j4y6fc7hflrc1rlmphxx40hkg6r")))) + (build-system python-build-system) + (inputs + `(("python2-pypdf2" ,python2-pypdf2))) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-pypdf-version-requirement + ;; A PyPDF2 version requirement of 1.25.1 is hard-coded in + ;; setup.py. Relax it to work with any version of PyPDF2. + (lambda _ + (substitute* "setup.py" + (("PyPDF2==1.25.1") "PyPDF2")) + #t))))) + (home-page "https://github.com/hellerbarde/stapler") + (synopsis "PDF manipulation tool") + (description "Stapler is a pure Python alternative to PDFtk, a tool for +manipulating PDF documents from the command line.") + (license license:bsd-3))) -- 2.23.0