From patchwork Sat Mar 9 00:00:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Massimo Zaniboni X-Patchwork-Id: 61577 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 C307F27BBEA; Sat, 9 Mar 2024 14:04:03 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 245F727BBE9 for ; Sat, 9 Mar 2024 14:04:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rixI1-0005GF-Rf; Sat, 09 Mar 2024 09:03:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rin9N-0004u7-Up for guix-patches@gnu.org; Fri, 08 Mar 2024 22:13:30 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rin9N-0004jW-Mc for guix-patches@gnu.org; Fri, 08 Mar 2024 22:13:29 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rin9u-0002c9-0s for guix-patches@gnu.org; Fri, 08 Mar 2024 22:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69661] [PATCH] gnu: Add redo-apenwarr Resent-From: Massimo Zaniboni Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 09 Mar 2024 03:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69661 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69661@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170995403710023 (code B ref -1); Sat, 09 Mar 2024 03:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Mar 2024 03:13:57 +0000 Received: from localhost ([127.0.0.1]:60016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rin9n-0002bY-7j for submit@debbugs.gnu.org; Fri, 08 Mar 2024 22:13:57 -0500 Received: from lists.gnu.org ([209.51.188.17]:58380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rik9n-0006K4-Do for submit@debbugs.gnu.org; Fri, 08 Mar 2024 19:01:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rik9F-0007MB-PP for guix-patches@gnu.org; Fri, 08 Mar 2024 19:01:09 -0500 Received: from mail.asterisell.com ([193.30.121.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rik9C-0005lE-TZ for guix-patches@gnu.org; Fri, 08 Mar 2024 19:01:09 -0500 Message-ID: <697dee67-e9a7-4479-bad9-65822bfcc162@dokmelody.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dokmelody.org; s=mail; t=1709942430; bh=9b4hfQtuLJIYAQg7uJWe6oXOEGaxbUeOyBX72Dqrgq0=; h=Date:To:From:Subject; b=E8ISuk1oiYBRTeJQS4TA0KrvnTF2LFroRvPXjlUxb1eZkAC+JYMmPk0t9OaGL/cJT xfzgcCBvei0S/c9ifOShhpDc2KLb4nD6XveK8wht86PBaPHCsbdNfkyw8HRDJr7N6u wm/2DMbcAQd/48aGsLGC+uNPgqR2JphOeDwUEa9M= Date: Sat, 9 Mar 2024 01:00:28 +0100 MIME-Version: 1.0 Content-Language: en-US From: Massimo Zaniboni Received-SPF: pass client-ip=193.30.121.134; envelope-from=mzan@dokmelody.org; helo=mail.asterisell.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 08 Mar 2024 22:13:44 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sat, 09 Mar 2024 09:03:04 -0500 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Change-Id: Ied142a7dc3e9baf9babdeff046f350e647a7a5cc --- gnu/packages/build-tools.scm | 110 +++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) + (license license:asl2.0))) + (define-public scons (package (name "scons") base-commit: d79c88e8809d2079452fd276bf4d17eb16636ff9 diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 15d88de..54de681 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2021 qblade ;;; Copyright © 2021, 2023 Maxim Cournoyer ;;; Copyright © 2022, 2023 Juliana Sims +;;; Copyright © 2024 Massimo Zaniboni ;;; ;;; This file is part of GNU Guix. ;;; @@ -457,6 +458,115 @@ (define-public premake5 scripted definition of a software project and outputs @file{Makefile}s or other lower-level build files."))) +(define-public redo-apenwarr + (package + (name "redo-apenwarr") + (version "0.42d") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apenwarr/redo") + (commit (string-append "redo-" version)))) + (sha256 + (base32 "0z78fmkb85k9hnpvh0pgi8cahljjgnr6j7mb614cykvpa3xsyl0p")))) + + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:parallel-build? #f + #:parallel-tests? #f + #:make-flags (list (string-append "PREFIX=" + (assoc-ref %outputs "out")) + "DESTDIR=/") + #:phases (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'patch-shell-scripts + (lambda* (#:key inputs outputs #:allow-other-keys) + + (patch-shebang "minimal/do") + + ;; In Guix build phase there is no anymore a Git repo, + ;; hence the Git tool cannot be anymore called. + ;; So the content of the file is manually generated. + (let* ((repo-version "0.42d") + (repo-commit + "7f00abc36be15f398fa3ecf9f4e5283509c34a00") + (repo-date "2021-07-27 20:48:36 -0700") + (repo-head (format #f + "(HEAD -> main, tag: redo-~a)" + repo-version))) + + (substitute* '("redo/version/gitvars.pre") + (("\\$Format:%H\\$") + repo-commit) + (("\\$Format:%d\\$") + repo-head) + (("\\$Format:%ci\\$") + repo-date))) + + ;; Redo scripts can inject shebangs headers to generated scripts. + (substitute* '("bin/default.do" + "t/203-make/whichmake.do" + "redo/py.do" + "redoconf/link.od" + "redoconf/run.od" + "redoconf/link-shlib.od" + "redoconf/_compile.od" + "redoconf/compile.od" + "minimal/do") + (("#!/bin/sh") + (format #f "#!~a" + (which "sh")))) + + ;; Use `pwd' on the store. + (substitute* '("t/all.do" "t/105-sympath/all.do" + "t/110-compile/hello.o.do" "minimal/do" + "minimal/do.test" "do") + (("/bin/pwd") + (which "pwd")) + (("/bin/ls") + (which "ls"))) + + ;; Use `perl' on the store. + (substitute* '("t/200-shell/nonshelltest.do") + (("/usr/bin/env perl") + (format #f "~a" + (which "perl")))) + + ;; Use `gcc' compiler, because Guix has no default `cc' compiler. + (substitute* '("docs/cookbook/hello/hello.do" + "t/110-compile/LD.do" + "t/110-compile/CC.do" + "t/110-compile/yellow.o.do" + "t/111-example/CC.do" + "t/111-example/hello.do") + (("^([ \t]*)cc " dummy starting-spaces) + (string-append starting-spaces "gcc "))) + + (substitute* '("t/110-compile/all.do" + "t/111-example/all.do") + ((" type cc ") + " type gcc ")) + + (substitute* '("docs/cookbook/c/flagtest.o.od") + (("^CC=\"\\$CC\"") + "CC=\"gcc\""))))))) + + (inputs (list python-wrapper python-markdown python-beautifulsoup4)) + + (native-inputs + ;; Used for the tests. + (list which perl git gcc)) + + (synopsis + "Build tool where dependencies are part of the building instructions") + (description + "Redo-apenwarr is a build tool where each artifact is produced by a shell +script having optional annotations for specifying its dependencies.") + (home-page "https://github.com/apenwarr/redo")