From patchwork Tue Feb 20 07:03:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 60801 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 A356627BBEA; Tue, 20 Feb 2024 07:05:21 +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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 77CFD27BBE2 for ; Tue, 20 Feb 2024 07:05:18 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcKBR-00072Q-4U; Tue, 20 Feb 2024 02:04:53 -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 1rcKBK-0006zJ-H7 for guix-patches@gnu.org; Tue, 20 Feb 2024 02:04:47 -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 1rcKBF-0006rM-2D for guix-patches@gnu.org; Tue, 20 Feb 2024 02:04:45 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcKBa-0004Xy-Hz for guix-patches@gnu.org; Tue, 20 Feb 2024 02:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69283] [PATCH 2/3] guix: Remove rakudo-build-system. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Feb 2024 07:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69283 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69283@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 69283-submit@debbugs.gnu.org id=B69283.170841269217447 (code B ref 69283); Tue, 20 Feb 2024 07:05:02 +0000 Received: (at 69283) by debbugs.gnu.org; 20 Feb 2024 07:04:52 +0000 Received: from localhost ([127.0.0.1]:44185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcKBP-0004XK-4A for submit@debbugs.gnu.org; Tue, 20 Feb 2024 02:04:52 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:43468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcKBJ-0004Wg-1U for 69283@debbugs.gnu.org; Tue, 20 Feb 2024 02:04:46 -0500 Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-410e820a4feso34069445e9.1 for <69283@debbugs.gnu.org>; Mon, 19 Feb 2024 23:04:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708412598; x=1709017398; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=1TKYPkNwYpDPplSTK5P4sfKxiroreZGvAd8aA+x64Lk=; b=hZ9HI6E2TxVphmIp/vPV8ENb+LP6y9qSo9OBBSDAXpTEbecsWrfG66ShvZpn2+whxv iFJzHp1MLqg9vvuEYuNEAptNUzgPVbWFr1C3Lz9tF72c679EfXl7ZWu8SV2Snz3IuQ7u rH40/9PxXyMxUbpFmuItuKfW+/y1a+or8lG3Cfiv+hcb6NJSxUMTRgU12T/FvKohT+GN qD+wRkV77694985w7Z3zuAO3PPzcJMpWTwG0f+A7/jCVyx7j5K/AfzFVPBLwPm/KDiUl A1wUakbQZFXq/XAO4m1OlUZGXWOTcY+mpSDUNMTzDzeUxkC5aIhpm+kBBBJb2C4m3YTh HEjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708412598; x=1709017398; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=1TKYPkNwYpDPplSTK5P4sfKxiroreZGvAd8aA+x64Lk=; b=J1WIq/DxRxEhL6T9tQQ2ZYxsWuVCsVmi2dPBBotpqgxfXqptQz5SOdz+o5IlEaVPJ8 8NSmah2OiWDvKYnxtum1mChr8yaP7m+VM6zLbwX1tLoAWOwln+yUAW5E4rnAMAtz8E5/ dNRZql+vl/ccOpPn7vWnYc9J2v5D4M9HPCQ1e1kfbeD8T3dyshyRj1pP0f5rLK5qyO4S rU1jD46vUK81l5+bQBuRaExT37yeL1FJwpSu+XVoFsCwHy+LEsG4ly3qLQScDueYXHHf V5mElhJ1dL2vUOyjcnnAft0aIobEOP2PAyXkRY3uZStlqf4DxcK9E06P6EeMyARqfTT3 jOuA== X-Gm-Message-State: AOJu0Yz6V/yN5jwgiByZ6Cj5QlR/PbsEfSnX+1yzHLnx1vCZB3zydxvu djJyrS0HJZIpT1ReHiaj94+1r4lxNgXqjAmAfSeGwOz3p8NAiTskRCuU8kkvX5U= X-Google-Smtp-Source: AGHT+IHXsHBZXqet4WDy0drQa7uwjLVrWO2xMD7ZOwrEs8tdUWqY+Zy4DrEP2QAQk8lUwV2Jr1Py5Q== X-Received: by 2002:a05:6000:174d:b0:33d:1d3a:4412 with SMTP id m13-20020a056000174d00b0033d1d3a4412mr7225226wrf.12.1708412597338; Mon, 19 Feb 2024 23:03:17 -0800 (PST) Received: from localhost ([141.226.12.177]) by smtp.gmail.com with ESMTPSA id h7-20020a056000000700b0033ce214a97csm12408213wrx.17.2024.02.19.23.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 23:03:17 -0800 (PST) From: Efraim Flashner Date: Tue, 20 Feb 2024 09:03:03 +0200 Message-ID: <0d38a55be8a40b591a7846d013b957702d6b2145.1708411903.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/build/rakudo-build-system.scm: Remove file. * guix/build-system/rakudo.scm: Remove file. * doc/guix.texi (Build Systems): Remove section for rakudo-build-system. * etc/snippets/yas/scheme-mode/guix-package: Remove rakudo-build-system. * Makefile.am (MODULES): Remove rakudo-build-system files. Change-Id: Ida6ec6c9be075f10be540c82cee5207176f1cfe2 --- Makefile.am | 2 - doc/guix.texi | 18 --- etc/snippets/yas/scheme-mode/guix-package | 1 - guix/build-system/rakudo.scm | 142 -------------------- guix/build/rakudo-build-system.scm | 153 ---------------------- 5 files changed, 316 deletions(-) delete mode 100644 guix/build-system/rakudo.scm delete mode 100644 guix/build/rakudo-build-system.scm diff --git a/Makefile.am b/Makefile.am index cef972880c..aef56ca90c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -181,7 +181,6 @@ MODULES = \ guix/build-system/python.scm \ guix/build-system/qt.scm \ guix/build-system/r.scm \ - guix/build-system/rakudo.scm \ guix/build-system/rebar.scm \ guix/build-system/renpy.scm \ guix/build-system/ruby.scm \ @@ -245,7 +244,6 @@ MODULES = \ guix/build/qt-build-system.scm \ guix/build/r-build-system.scm \ guix/build/renpy-build-system.scm \ - guix/build/rakudo-build-system.scm \ guix/build/rebar-build-system.scm \ guix/build/ruby-build-system.scm \ guix/build/scons-build-system.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index fe6f82d4a5..06350efd7b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10122,24 +10122,6 @@ Build Systems @code{tools::testInstalledPackage}. @end defvar -@defvar rakudo-build-system -This variable is exported by @code{(guix build-system rakudo)}. It -implements the build procedure used by @uref{https://rakudo.org/, -Rakudo} for @uref{https://perl6.org/, Perl6} packages. It installs the -package to @code{/gnu/store/@dots{}/NAME-VERSION/share/perl6} and -installs the binaries, library files and the resources, as well as wrap -the files under the @code{bin/} directory. Tests can be skipped by -passing @code{#f} to the @code{tests?} parameter. - -Which rakudo package is used can be specified with @code{rakudo}. -Which perl6-tap-harness package used for the tests can be specified with -@code{#:prove6} or removed by passing @code{#f} to the -@code{with-prove6?} parameter. -Which perl6-zef package used for tests and installing can be specified -with @code{#:zef} or removed by passing @code{#f} to the -@code{with-zef?} parameter. -@end defvar - @defvar rebar-build-system This variable is exported by @code{(guix build-system rebar)}. It implements a build procedure around @uref{https://rebar3.org,rebar3}, diff --git a/etc/snippets/yas/scheme-mode/guix-package b/etc/snippets/yas/scheme-mode/guix-package index 3bb6307659..d38b32dc05 100644 --- a/etc/snippets/yas/scheme-mode/guix-package +++ b/etc/snippets/yas/scheme-mode/guix-package @@ -36,7 +36,6 @@ "python-build-system" "qt-build-system" "r-build-system" - "rakudo-build-system" "rebar-build-system" "renpy-build-system" "ruby-build-system" diff --git a/guix/build-system/rakudo.scm b/guix/build-system/rakudo.scm deleted file mode 100644 index 3b30fdfd0e..0000000000 --- a/guix/build-system/rakudo.scm +++ /dev/null @@ -1,142 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019 Efraim Flashner -;;; Copyright © 2021 Ludovic Courtès -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (guix build-system rakudo) - #:use-module (guix store) - #:use-module (guix utils) - #:use-module (guix gexp) - #:use-module (guix monads) - #:use-module (guix search-paths) - #:use-module (guix build-system) - #:use-module (guix build-system gnu) - #:use-module (guix packages) - #:export (%rakudo-build-system-modules - rakudo-build - rakudo-build-system)) - -;; Commentary: -;; -;; Standard build and install procedure for packages using the Rakudo -;; build system to be installed as system libraries. This is -;; implemented as an extension of `gnu-build-system'. -;; -;; Code: - -(define %rakudo-build-system-modules - ;; Build-side modules imported by default. - `((guix build rakudo-build-system) - ,@%gnu-build-system-modules)) - -(define (default-rakudo) - "Return the default Rakudo package." - - ;; Do not use `@' to avoid introducing circular dependencies. - (let ((module (resolve-interface '(gnu packages perl6)))) - (module-ref module 'rakudo))) - -(define (default-prove6) - "Return the default perl6-tap-harness package for tests." - (let ((module (resolve-interface '(gnu packages perl6)))) - (module-ref module 'perl6-tap-harness))) - -(define (default-zef) - "Return the default perl6-zef package." - (let ((module (resolve-interface '(gnu packages perl6)))) - (module-ref module 'perl6-zef))) - -(define* (lower name - #:key source inputs native-inputs outputs - system target - (rakudo (default-rakudo)) - (prove6 (default-prove6)) - (zef (default-zef)) - (with-prove6? #t) - (with-zef? #t) - #:allow-other-keys - #:rest arguments) - "Return a bag for NAME." - (define private-keywords - '(#:target #:rakudo #:prove6 #:zef #:inputs #:native-inputs)) - - (and (not target) ;XXX: no cross-compilation - (bag - (name name) - (system system) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs - - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (build-inputs `(("rakudo" ,rakudo) - ,@(if with-prove6? - `(("perl6-tap-harness" ,prove6) - ,@(if with-zef? - `(("perl6-zef" ,zef)) - '())) - '()) - ,@native-inputs)) - (outputs outputs) - (build rakudo-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) - -(define* (rakudo-build name inputs - #:key - source - (search-paths '()) - (tests? #t) - (phases '%standard-phases) - (outputs '("out")) - (system (%current-system)) - (guile #f) - (with-zef? #t) - (with-prove6? #t) - (imported-modules %rakudo-build-system-modules) - (modules '((guix build rakudo-build-system) - (guix build utils)))) - "Build SOURCE using PERL6, and with INPUTS." - (define builder - (with-imported-modules imported-modules - #~(begin - (use-modules #$@(sexp->gexp modules)) - (rakudo-build #:name #$name - #:source #+source - #:search-paths '#$(sexp->gexp - (map search-path-specification->sexp - search-paths)) - #:phases #$phases - #:system #$system - #:tests? #$tests? - #:outputs #$(outputs->gexp outputs) - #:inputs #$(input-tuples->gexp inputs))))) - - (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) - system #:graft? #f))) - (gexp->derivation name builder - #:system system - #:guile-for-build guile))) - -(define rakudo-build-system - (build-system - (name 'rakudo) - (description "The standard Rakudo build system") - (lower lower))) - -;;; rakudo.scm ends here diff --git a/guix/build/rakudo-build-system.scm b/guix/build/rakudo-build-system.scm deleted file mode 100644 index 5cf1cc55bc..0000000000 --- a/guix/build/rakudo-build-system.scm +++ /dev/null @@ -1,153 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019 Efraim Flashner -;;; Copyright © 2021 Maxime Devos -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (guix build rakudo-build-system) - #:use-module ((guix build gnu-build-system) #:prefix gnu:) - #:use-module (guix build utils) - #:use-module (ice-9 ftw) - #:use-module (ice-9 match) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:export (%standard-phases - rakudo-build)) - -;; Commentary: -;; -;; Builder-side code of the standard Rakudo package build procedure. -;; -;; Code: - -(define* (check #:key tests? inputs with-prove6? #:allow-other-keys) - (if (and tests? (assoc-ref inputs "perl6-tap-harness")) - ;(if (and tests? with-prove6?) - (invoke "prove6" "-I=lib" "t/") - (format #t "test suite not run~%")) - #t) - -(define* (install #:key inputs outputs with-zef? #:allow-other-keys) - "Install a given Perl6 package." - (let* ((out (assoc-ref outputs "out")) - (perl6 (string-append out "/share/perl6"))) - (if (assoc-ref inputs "perl6-zef") - ;(if with-zef? - (begin - (let ((zef (string-append (assoc-ref inputs "perl6-zef") - "/bin/zef"))) - (setenv "HOME" (getcwd)) - (mkdir-p perl6) - (invoke zef "install" "--verbose" "." - ;; Don't install any of the following: - "--/depends" "--/build-depends" "--/test-depends" - (string-append "--install-to=" perl6)) - (delete-file (string-append perl6 "/repo.lock"))) - #t) - (begin - (let ((inst (string-append (assoc-ref inputs "rakudo") - "/share/perl6/tools/install-dist.p6"))) - (setenv "RAKUDO_RERESOLVE_DEPENDENCIES" "0") - (setenv "RAKUDO_MODULE_DEBUG" "1") ; be verbose while building - (invoke inst (string-append "--to=" perl6) "--for=site")))))) - -(define* (install-libs #:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (lock "lib/.precomp/.lock")) - (when (file-exists? lock) - (delete-file "lib/.precomp/.lock")) - (copy-recursively "lib" (string-append out "/share/perl6/lib")) - #t)) - -(define* (install-bins #:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (when (file-exists? "bin") - (for-each (lambda (file) - (install-file file (string-append out "/bin")) - (chmod (string-append out "/" file) #o555)) - (find-files "bin" ".*"))) - (when (file-exists? "sbin") - (for-each (lambda (file) - (install-file file (string-append out "/sbin")) - (chmod (string-append out "/" file) #o555)) - (find-files "sbin" ".*"))) - #t)) - -(define* (install-resources #:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (when (file-exists? "resources") - (copy-recursively "resources" - (string-append out "/share/perl6/resources"))) - #t)) - -(define* (wrap #:key inputs outputs #:allow-other-keys) - (define (list-of-files dir) - (map (cut string-append dir "/" <>) - (or (scandir dir (lambda (f) - (let ((s (stat (string-append dir "/" f)))) - (and (eq? 'regular (stat:type s)) - (not (wrapped-program? f)))))) - '()))) - - (define bindirs - (append-map (match-lambda - ((_ . dir) - (list (string-append dir "/bin") - (string-append dir "/sbin")))) - outputs)) - - ;; Do not require bash to be present in the package inputs - ;; even when there is nothing to wrap. - ;; Also, calculate (sh) only once to prevent some I/O. - (define %sh (delay (search-input-file inputs "bin/bash"))) - (define (sh) (force %sh)) - - (let* ((out (assoc-ref outputs "out")) - (var `("PERL6LIB" "," prefix - ,(cons (string-append out "/share/perl6/lib," - out "/share/perl6/site/lib," - out "/share/perl6/vendor/lib") - (search-path-as-string->list - (or (getenv "PERL6LIB") "") #\,))))) - (for-each (lambda (dir) - (let ((files (list-of-files dir))) - (for-each (cut wrap-program <> #:sh (sh) var) - files))) - bindirs) - #t)) - -(define %standard-phases - ;; No need for 'bootstrap, 'configure or 'build. - (modify-phases gnu:%standard-phases - (delete 'bootstrap) - (delete 'configure) - (delete 'build) - (replace 'check check) - (replace 'install install) - (add-before 'install 'install-lib-dir install-libs) - (add-after 'install-lib-dir 'install-resources install-resources) - (add-after 'install-resources 'install-binaries install-bins) - ;; needs to be after 'install-binaries and all 'install phases - (add-after 'install 'wrap wrap))) - -(define* (rakudo-build #:key inputs (phases %standard-phases) - #:allow-other-keys #:rest args) - "Build the given Perl6 package, applying all of PHASES in order." - (apply gnu:gnu-build - #:inputs inputs #:phases phases - args)) - -;;; rakudo-build-system.scm ends here