From patchwork Thu Jul 2 00:50:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kyle Meyer X-Patchwork-Id: 22984 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6DCC327BBE3; Thu, 2 Jul 2020 01:52:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C073A27BBE1 for ; Thu, 2 Jul 2020 01:52:08 +0100 (BST) Received: from localhost ([::1]:38600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jqnSS-0007VG-8r for patchwork@mira.cbaines.net; Wed, 01 Jul 2020 20:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqnSM-0007V9-Ki for guix-patches@gnu.org; Wed, 01 Jul 2020 20:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jqnSM-0008QU-Bh for guix-patches@gnu.org; Wed, 01 Jul 2020 20:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jqnSM-0003IU-A3 for guix-patches@gnu.org; Wed, 01 Jul 2020 20:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42159] [PATCH] gnu: git-annex: Build and install man pages. Resent-From: Kyle Meyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Jul 2020 00:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42159 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42159@debbugs.gnu.org Cc: Kyle Meyer X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159365106412608 (code B ref -1); Thu, 02 Jul 2020 00:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jul 2020 00:51:04 +0000 Received: from localhost ([127.0.0.1]:53977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqnRH-0003Gr-Vc for submit@debbugs.gnu.org; Wed, 01 Jul 2020 20:51:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:37288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jqnRF-0003Gi-0C for submit@debbugs.gnu.org; Wed, 01 Jul 2020 20:50:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqnRE-0007CK-LL for guix-patches@gnu.org; Wed, 01 Jul 2020 20:50:52 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:53008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jqnRB-00089S-Ny for guix-patches@gnu.org; Wed, 01 Jul 2020 20:50:52 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 312206BB72; Wed, 1 Jul 2020 20:50:46 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=sasl; bh=/3ZGcOWzCaVdUnUb3jdz6z5xW PY=; b=Ez/FpBmO8N+d+lmvKzBFoB4WCfYVk5nsShvxZg8ojzE0Tfnd+NfqqdBjI M6F+lQiFYJYdNEmkfD1yN/FyXQCallaRXjLXTlNlulUhTzsE3y3e9dUFxtLcTaaa ShFgACc6EUZ7KnRcLpWssG1bgB3DWlUkw0br8uy8Q6SDsSQt6c= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 292EB6BB71; Wed, 1 Jul 2020 20:50:46 -0400 (EDT) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=Ftf15ZTy9Jj80e6VpGGqvLKZiZ6rbWZlsQ8hABR9yyk=; b=f4wIDLae/FaCXwp/y/WWqlU1Qy6c1LgaHJLTrKeSQHWbFr0Y07cDnJ+c5lOnVv/coaHZ8CnSIaAB+kYMqww6hEe8AoKDriYVclF5ImDZd6Frze0C7zvIq4YpDL/B0B1Lh/9JoA3fSBALcCBvcgISd2hqvV/piOtGx7DJKgErJ/A= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 9B1E96BB70; Wed, 1 Jul 2020 20:50:45 -0400 (EDT) (envelope-from kyle@kyleam.com) From: Kyle Meyer Date: Wed, 1 Jul 2020 20:50:41 -0400 Message-Id: <20200702005041.11965-1-kyle@kyleam.com> X-Mailer: git-send-email 2.27.0.383.g050319c2ae MIME-Version: 1.0 X-Pobox-Relay-ID: 10397E1E-BBFE-11EA-8A6D-D1361DBA3BAF-24757444!pb-smtp2.pobox.com Received-SPF: pass client-ip=64.147.108.71; envelope-from=kyle@kyleam.com; helo=pb-smtp2.pobox.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/01 20:50:46 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/haskell-apps.scm (git-annex)[arguments]: Add phases for building and installing the man pages. [native-inputs]: Add perl. --- gnu/packages/haskell-apps.scm | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) base-commit: 67ba9815c954d6ccef041d5dbbe2b2ba14f37474 diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm index f8bee424c3..5b6f0401e4 100644 --- a/gnu/packages/haskell-apps.scm +++ b/gnu/packages/haskell-apps.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2016, 2017 Leo Famulari ;;; Copyright © 2015 Paul van der Walt -;;; Copyright © 2019 Kyle Meyer +;;; Copyright © 2019, 2020 Kyle Meyer ;;; Copyright © 2015 John Soo ;;; Copyright © 2019, 2020 Efraim Flashner ;;; Copyright © 2019 Alex Griffin @@ -370,8 +370,7 @@ (define-public git-annex ;; Factor out necessary build logic from the provided ;; `Setup.hs' script. The script as-is does not work because ;; it cannot find its dependencies, and there is no obvious way - ;; to tell it where to look. Note that we do not preserve the - ;; code that installs man pages here. + ;; to tell it where to look. (call-with-output-file "PreConf.hs" (lambda (out) (format out "import qualified Build.Configure as Configure~%") @@ -385,6 +384,18 @@ (define-public git-annex (lambda _ (invoke "runhaskell" "PreConf.hs") #t)) + (add-after 'build 'build-manpages + (lambda _ + ;; The Setup.hs rewrite above removed custom code for building + ;; the man pages. In addition to that code, git-annex's source + ;; tree has a file that's not included in the tarball but is used + ;; by the Makefile to build man pages. Copy the core bits here. + (call-with-output-file "Build/MakeMans.hs" + (lambda (out) + (format out "module Main where~%") + (format out "import Build.Mans~%") + (format out "main = buildMansOrWarn~%"))) + (invoke "runhaskell" "Build/MakeMans.hs"))) (replace 'check (lambda _ ;; We need to set the path so that Git recognizes @@ -400,6 +411,14 @@ (define-public git-annex ;; Undo `patch-shell-for-tests'. (copy-file "/tmp/Shell.hs" "Utility/Shell.hs") (apply (assoc-ref %standard-phases 'build) args))) + (add-after 'install 'install-manpages + (lambda* (#:key outputs #:allow-other-keys) + (let ((man (string-append (assoc-ref outputs "out") + "/man/man1/"))) + (mkdir-p man) + (for-each (lambda (file) (install-file file man)) + (find-files "man"))) + #t)) (add-after 'install 'install-symlinks (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -465,7 +484,8 @@ (define-public git-annex `(("ghc-tasty" ,ghc-tasty) ("ghc-tasty-hunit" ,ghc-tasty-hunit) ("ghc-tasty-quickcheck" ,ghc-tasty-quickcheck) - ("ghc-tasty-rerun" ,ghc-tasty-rerun))) + ("ghc-tasty-rerun" ,ghc-tasty-rerun) + ("perl" ,perl))) (home-page "https://git-annex.branchable.com/") (synopsis "Manage files with Git, without checking in their contents") (description "This package allows managing files with Git, without