Package: guix-patches;
Reported by: Massimo Zaniboni <mzan <at> dokmelody.org>
Date: Sat, 9 Mar 2024 03:14:01 UTC
Severity: normal
Tags: moreinfo, patch
Message #11 received at 69661 <at> debbugs.gnu.org (full text, mbox):
From: Massimo Zaniboni <mzan <at> dokmelody.org> To: 69661 <at> debbugs.gnu.org Cc: Massimo Zaniboni <mzan <at> dokmelody.org> Subject: [PATCH v2] gnu: Add redo-apenwarr. Date: Tue, 12 Mar 2024 16:05:32 +0100
* gnu/packages/build-tools.scm (redo-apenwarr): New variable. Change-Id: Ied142a7dc3e9baf9babdeff046f350e647a7a5cc --- gnu/packages/build-tools.scm | 128 +++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 15d88de..11dd337 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2021 qblade <qblade <at> protonmail.com> ;;; Copyright © 2021, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com> ;;; Copyright © 2022, 2023 Juliana Sims <juli <at> incana.org> +;;; Copyright © 2024 Massimo Zaniboni <mzan <at> dokmelody.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -457,6 +458,133 @@ (define-public premake5 scripted definition of a software project and outputs @file{Makefile}s or other lower-level build files."))) +(define-public redo-apenwarr + (let ((origin-url "https://github.com/apenwarr/redo") + (origin-date "2021-07-27 20:48:36 -0700") + (origin-version "0.42d") + (origin-commit "7f00abc36be15f398fa3ecf9f4e5283509c34a00")) + + (package + (name "redo-apenwarr") + (version origin-version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url origin-url) + (commit (string-append "redo-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0z78fmkb85k9hnpvh0pgi8cahljjgnr6j7mb614cykvpa3xsyl0p")))) + + (build-system gnu-build-system) + (arguments + (list + #:test-target "test" + #:make-flags #~(list (string-append "PREFIX=" + #$output "/out") "DESTDIR=/") + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'patch-shell-scripts + (lambda* _ + + ;; The building tool queries the Git repository, + ;; for retrieving info about the commit hash and date, + ;; but this information is not anymore present in the + ;; source code downloaded from Guix. + ;; So this information will be generated manually here, + ;; using the data specified in the `origin-*' params. + (substitute* '("redo/version/gitvars.pre") + (("\\$Format:%H\\$") + #$origin-commit) + (("\\$Format:%d\\$") + (format #f "(HEAD -> main, tag: redo-~a)" + #$origin-version)) + (("\\$Format:%ci\\$") + #$origin-date)) + + ;; redo-apenwarr can generate support scripts having + ;; shebangs headers. We will patch these scripts + ;; for using the `sh' in the store. + (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") + (string-append "#!" + #$(file-append bash "/bin/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") + #$(file-append coreutils "/bin/pwd")) + (("/bin/ls") + #$(file-append coreutils "/bin/ls"))) + + ;; Use `perl' on the store. + (substitute* '("t/200-shell/nonshelltest.do") + (("/usr/bin/env perl") + #$(file-append perl "/bin/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 + #$(file-append gcc "/bin/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\"") + (string-append "CC=\"" + #$(file-append gcc "/bin/gcc") "\"")))))))) + + (inputs (list coreutils bash python-wrapper)) + (native-inputs (list ;Used from the building script, + ;; for checking the existences of coreutils on the path. + which + + ;; Required for generating the documentation + python-markdown + python-beautifulsoup4 + + ;; TODO it cannot generate some part of the the documentation, + ;; because the disabled package python-mkdocs requires + ;; the missing PyPI plugin python-mkdocs-exclude + + ;; Required only for the tests. + perl + git + gcc)) + + (synopsis + "Build tool where dependencies are parts of the building instructions") + (description + "@code{redo-apenwarr} is a build tool where each target file is produced by +a normal shell script, but with additional commands for specifying +its dependencies. In tools like @code{make}, dependencies are specified +upfront (i.e. bottom-up), while in @code{redo-apenwarr} they are +generated dynamically during build script execution (i.e. top-down). +Rebuilds are incremental, i.e. only target files with changed dependencies +will be rebuilt.") + (home-page "https://github.com/apenwarr/redo") + (license license:asl2.0)))) + (define-public scons (package (name "scons") base-commit: d79c88e8809d2079452fd276bf4d17eb16636ff9 -- 2.41.0
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.