From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8KmYDl51y192aAAA0tVLHw (envelope-from ) for ; Sat, 05 Dec 2020 11:56:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8F5+Cl51y19eIQAA1q6Kng (envelope-from ) for ; Sat, 05 Dec 2020 11:56:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B9ACA940222 for ; Sat, 5 Dec 2020 11:56:13 +0000 (UTC) Received: from localhost ([::1]:50194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klWAe-00050U-MD for larch@yhetil.org; Sat, 05 Dec 2020 06:56:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klWAU-00050H-Np for guix-patches@gnu.org; Sat, 05 Dec 2020 06:56:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klWAT-00066a-Pp for guix-patches@gnu.org; Sat, 05 Dec 2020 06:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klWAT-0003Du-Om for guix-patches@gnu.org; Sat, 05 Dec 2020 06:56:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44821] [PATCH v4] gnu: Add diff-so-fancy. Resent-From: EuAndreh Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Dec 2020 11:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44821 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: leo@famulari.name Cc: 44821@debbugs.gnu.org Received: via spool by 44821-submit@debbugs.gnu.org id=B44821.160716935612376 (code B ref 44821); Sat, 05 Dec 2020 11:56:01 +0000 Received: (at 44821) by debbugs.gnu.org; 5 Dec 2020 11:55:56 +0000 Received: from localhost ([127.0.0.1]:46655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klWAO-0003DY-9e for submit@debbugs.gnu.org; Sat, 05 Dec 2020 06:55:56 -0500 Received: from box.euandre.org ([46.101.160.115]:34377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klWAL-0003DI-R5 for 44821@debbugs.gnu.org; Sat, 05 Dec 2020 06:55:54 -0500 Received: from authenticated-user (box.euandre.org [46.101.160.115]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by box.euandre.org (Postfix) with ESMTPSA id E4CD3FC3CD; Sat, 5 Dec 2020 08:55:45 -0300 (-03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=euandre.org; s=mail; t=1607169347; bh=jcYYxwgllgs9UMoOp2gntaZeCsS2FwR9xfUOpFJwtGE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AKvYGwG0ZBS7m2BkMkUdHf6r6XYWQrUeH3RPYSRJ3ZdnPXWAPTsU+xiWzqQeyBe/U zT/Nix58z3wAXwa9FVqXTy/YRyvgtYigGLmGXorw4pH9//9aVxg3v8/mVvGnBq4oYs ST7Nk4zOlcPgYW0y9Q2taZu3SFLTRwUhoTZPlzzneguTGBdpHzHaRZ60n7ZRDDGmuY Do02EwRMOFOZBzVORKgEJ4hlCdv6AkllutgeItTB+M+WLn+UWj5v/JvsE4QYv6owdk 2wa5JnbiHeK6OMyuGKus5uB9xEefm4vueI5tfvD7vx7zCEG8xlJyg61KDQUjJb5w1w FDrwm2L112n+A== Date: Sat, 5 Dec 2020 08:55:42 -0300 Message-Id: <20201205115542.15427-1-eu@euandre.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: EuAndreh , EuAndreh via Guix-patches From: EuAndreh via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 1.21 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=euandre.org header.s=mail header.b=AKvYGwG0; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B9ACA940222 X-Spam-Score: 1.21 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: zErREiTERpDN From: Leo Famulari * gnu/packages/version-control.scm (diff-so-fancy): New variable. --- Thanks for the revised patch. The only thing missing was the proper escaping of the substituted path: (string-append "use lib '" lib "';\n"))) The lib path had to be between quotes, with a final semicolon. I've taken yours and only fixed this part. I've tested it, and it works. gnu/packages/version-control.scm | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index eec57b3b6d..12e708e4e8 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -2812,6 +2812,53 @@ for historians.") (home-page "https://www.gnu.org/software/gnu-arch/") (license license:gpl2))) ;version 2 only +(define-public diff-so-fancy + (package + (name "diff-so-fancy") + (version "1.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/so-fancy/diff-so-fancy") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0aavxahzha2mms4vdwysk79pa6wzswpfwgsq2hwaxnaf66maahfl")))) + (inputs + `(("perl" ,perl) + ("ncurses" ,ncurses))) + (build-system copy-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-lib-path + (lambda* (#:key outputs #:allow-other-keys) + (let ((lib (string-append (assoc-ref outputs "out") "/lib"))) + (substitute* "diff-so-fancy" + (("use lib.*$") + (string-append "use lib '" lib "';\n"))) + #t))) + (add-after 'install 'symlink-executable + (lambda* (#:key outputs inputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (ncurses (assoc-ref inputs "ncurses")) + (perl (assoc-ref inputs "perl"))) + (wrap-program (string-append out "/bin/diff-so-fancy") + `("PATH" ":" prefix (,(string-append ncurses "/bin") + ,(string-append perl "/bin")))) + #t)))) + #:install-plan + '(("lib" "lib") + ("diff-so-fancy" "bin/")))) + (home-page "https://github.com/so-fancy/diff-so-fancy") + (synopsis "Makes diffs more human friendly and readable") + (description + "@code{diff-so-fancy} strives to make your diffs human readable instead +of machine readable. This helps improve code quality and helps you spot +defects faster.") + (license license:expat))) + (define-public go-github-go-git (package (name "go-github-go-git") -- 2.29.2