summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/build-tools.scm71
1 files changed, 71 insertions, 0 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index c3a66a19d45..26cc4cbef60 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -25,6 +25,7 @@
25;;; Copyright © 2025 Aiden Isik <aidenisik+git@member.fsf.org> 25;;; Copyright © 2025 Aiden Isik <aidenisik+git@member.fsf.org>
26;;; Copyright © 2025 Josep Bigorra <jjbigorra@gmail.com> 26;;; Copyright © 2025 Josep Bigorra <jjbigorra@gmail.com>
27;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com> 27;;; Copyright © 2025 John Kehayias <john.kehayias@protonmail.com>
28;;; Copyright © 2026 Nemin <bergengocia@protonmail.com>
28;;; 29;;;
29;;; This file is part of GNU Guix. 30;;; This file is part of GNU Guix.
30;;; 31;;;
@@ -44,10 +45,12 @@
44(define-module (gnu packages build-tools) 45(define-module (gnu packages build-tools)
45 #:use-module (ice-9 optargs) 46 #:use-module (ice-9 optargs)
46 #:use-module ((guix licenses) #:prefix license:) 47 #:use-module ((guix licenses) #:prefix license:)
48 #:use-module (gnu packages c)
47 #:use-module (guix build-system cmake) 49 #:use-module (guix build-system cmake)
48 #:use-module (guix build-system copy) 50 #:use-module (guix build-system copy)
49 #:use-module (guix build-system gnu) 51 #:use-module (guix build-system gnu)
50 #:use-module (guix build-system guile) 52 #:use-module (guix build-system guile)
53 #:use-module (guix build-system hare)
51 #:use-module (guix build-system meson) 54 #:use-module (guix build-system meson)
52 #:use-module (guix build-system pyproject) 55 #:use-module (guix build-system pyproject)
53 #:use-module (guix build-system python) 56 #:use-module (guix build-system python)
@@ -79,6 +82,7 @@
79 #:use-module (gnu packages lisp) 82 #:use-module (gnu packages lisp)
80 #:use-module (gnu packages logging) 83 #:use-module (gnu packages logging)
81 #:use-module (gnu packages lua) 84 #:use-module (gnu packages lua)
85 #:use-module (gnu packages man)
82 #:use-module (gnu packages ninja) 86 #:use-module (gnu packages ninja)
83 #:use-module (gnu packages package-management) 87 #:use-module (gnu packages package-management)
84 #:use-module (gnu packages pcre) 88 #:use-module (gnu packages pcre)
@@ -1374,3 +1378,70 @@ The Waf Book and in the API docs
1374;; as meson or ninja which are written in Python as well. 1378;; as meson or ninja which are written in Python as well.
1375(define-deprecated-package python-waf 1379(define-deprecated-package python-waf
1376 waf) 1380 waf)
1381
1382(define-public haredo
1383 (package
1384 (name "haredo")
1385 (version "1.0.6")
1386 (source
1387 (origin
1388 (method git-fetch)
1389 (uri (git-reference
1390 (url "https://git.sr.ht/~autumnull/haredo/")
1391 (commit version)))
1392 (file-name (git-file-name name version))
1393 (sha256 (base32 "1ysm8rgxi0i4zb1q6xj3pf5bwxssjlcc4x158pyd78l8ahz30fn2"))))
1394 (build-system hare-build-system)
1395 (native-inputs
1396 ;; XXX: `harec` and `qbe` are pulled in because Haredo assumes these
1397 ;; programs are present and allows build scripts to rely on them freely.
1398 ;;
1399 ;; See: https://git.sr.ht/~autumnull/haredo/tree/1.0.6/item/doc/haredo.1.scd
1400 ;;
1401 ;; Importing `harec` the usual way results in a circular dependency for
1402 ;; packages that rely on `hare-build-system`. To avoid that, we import
1403 ;; it using delayed evaluation.
1404 (list scdoc
1405 (module-ref (resolve-interface '(gnu packages hare)) 'harec)
1406 qbe))
1407 (supported-systems %hare-supported-systems)
1408 (arguments
1409 (list
1410 #:tests? #f
1411 #:phases
1412 #~(modify-phases %standard-phases
1413 (add-before 'build 'set-prefix
1414 (lambda _ (setenv "PREFIX" #$output)))
1415 (add-before 'build 'override-defaults
1416 (lambda* (#:key inputs #:allow-other-keys)
1417 ;; XXX: To prevent future packagers from needing to do delayed
1418 ;; input evaluation in all subsequent packages that rely on
1419 ;; `haredo` and `hare-build-system`, this package provides the
1420 ;; Guix-packaged `harec` and `qbe` as defaults (which can be
1421 ;; overridden if needed by setting the appropriate environment
1422 ;; variable).
1423 (let ((harec-binary (search-input-file inputs "/bin/harec"))
1424 (qbe-binary (search-input-file inputs "/bin/qbe")))
1425 (substitute* "./src/haredo.ha"
1426 (("(\"HAREC\", \"harec\")")
1427 (format #f "(\"HAREC\", \"~a\")" harec-binary))
1428 (("(\"QBE\", \"qbe\")")
1429 (format #f "(\"QBE\", \"~a\")" qbe-binary))))))
1430 (replace 'build
1431 (lambda _ (invoke "./bootstrap.sh")))
1432 (replace 'install
1433 (lambda _ (invoke "./bootstrap.sh" "install"))))))
1434 (home-page "https://sr.ht/~autumnull/haredo/")
1435 (synopsis "Build automator, alternative to @command{make} and @command{redo}")
1436 (description "@command{haredo} is a build automator.
1437It is an alternative to e.g. @command{make(1)} and @command{redo(1)}. Features:
1438
1439@itemize
1440@item Script syntax is plain shell script,
1441@item Only one command with few extraneous rules,
1442@item .do files are short and modular like in redo,
1443@item Builds its dependency tree on the fly, uses no database,
1444@item Doesn't break the build state when interrupted.
1445@end itemize
1446")
1447 (license license:wtfpl2)))