From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id eHAXN57RuGbOtgAA62LTzQ:P1 (envelope-from ) for ; Sun, 11 Aug 2024 14:58:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id eHAXN57RuGbOtgAA62LTzQ (envelope-from ) for ; Sun, 11 Aug 2024 16:58:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=snCWEfJf; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=C1rnDDNp; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723388318; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2p/VzmBoa19lLE9dkdLbL2eDl+3bosyUZDkVIgS1XAE=; b=bzJ5Asefze1HfVBWasunDYDILaT/rnyi/74ZUmPIfZRND66tPMs6QeLI/a+0qLoA7txUJy WIdlC7FkPzyJLb/vHJ1s8VGjZ4SyVKmXvbJzrkqyXuOn15DDD6sxZNVZ0TKFPdwsSPJKHD j8XnYDdpVMg+8lP322t/Ja0pJY6tAXt71hastgBkugeeC0SS+oF5GxdtBXsExj6gViczAI refwXIRCvb6MQtN3ZxJUkjCY2kYc3wrIYGloL3jjl9tYliOlG+bw/ShS56XqDGqUjiHy7G bWGmCwT7CEmvYvi3gLc5GFBLaEuGDWqDZClNyxG3rAEQbh0yJD7+SHO+PDDe9A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723388318; a=rsa-sha256; cv=none; b=X4pukDrKs4XiaMxXP270/0NVB7dlKwmfJjtwWONEs5xcwZuECyxPjMtQKaSdDUUHk572TH xz5LoqCTgxzIgK/oI45OjmFLRks1IIgdSEa7Di0mGNJaDQikiNasmZ1JP98s+x8cH8yG3m In0zfENLs+Yy9qvoZdAdH4Ai8xdiEQIG/l3CMmv/wq8RvFCzHEg17ikSTvtPdR+CM7Yyun 6Hwrcj54EqsmgkdXjUV2XczNcttYwgy5RlvmYXPpv/EEqM3OaMDxvITDvZP6Y1BwY1k3zN k17Nq+/DHEM1zQnXtddfpqTg8NDb+8h2+uZYWxSWSgNVz0wywMvq1TcJRPm+9Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=snCWEfJf; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=C1rnDDNp; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" 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 81EE06BAD2 for ; Sun, 11 Aug 2024 16:58:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdA1h-00079O-6j; Sun, 11 Aug 2024 10:58:33 -0400 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 1sdA1f-00078z-GY for guix-patches@gnu.org; Sun, 11 Aug 2024 10:58:31 -0400 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 1sdA1f-000417-7L for guix-patches@gnu.org; Sun, 11 Aug 2024 10:58:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=From:MIME-Version:Date:To:In-Reply-To:References:Subject; bh=2p/VzmBoa19lLE9dkdLbL2eDl+3bosyUZDkVIgS1XAE=; b=snCWEfJfgBFiVKjzyTCWlQwZTeO6VlHsJx+xUmx2dAZzM8RN150W1YY9bRAjNIpfHgFxqxtNytBoeEUl5rIZCqjhCrBiROXM9tzCgrWBGK8ZlSBNeHV1UnfnWRmIzGXFMOvd7AIj+jwZByE0w8FDnWhbLXo1EV0Ln9UjkeaeAvops2d2hW3zJsLRquNHAC8lRwcsvI38esTT8sM06hOOUhqvIXA1vYfNveGO8MW3KtzsMqjcOyFaUgQRJjbJ3oRHlGzhvYpWZLKKAzQmCqgwvNDGiped6uBtCGmomJruZeGWHOTg2yJ645jquTfMKJHCZOJriHs3+X3NpYwAaQ5Yow==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sdA29-0007Qh-UU for guix-patches@gnu.org; Sun, 11 Aug 2024 10:59:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72494] [PATCH v4] gnu: Add c3c-bootstrap. References: In-Reply-To: Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Aug 2024 14:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72494 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72494@debbugs.gnu.org Cc: Ashvith Shetty Received: via spool by 72494-submit@debbugs.gnu.org id=B72494.172338833828550 (code B ref 72494); Sun, 11 Aug 2024 14:59:01 +0000 Received: (at 72494) by debbugs.gnu.org; 11 Aug 2024 14:58:58 +0000 Received: from localhost ([127.0.0.1]:41861 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdA26-0007QQ-14 for submit@debbugs.gnu.org; Sun, 11 Aug 2024 10:58:58 -0400 Received: from layka.disroot.org ([178.21.23.139]:37822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdA23-0007QG-6O for 72494@debbugs.gnu.org; Sun, 11 Aug 2024 10:58:56 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id D145040482; Sun, 11 Aug 2024 16:58:23 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QYS_ypYJV-s4; Sun, 11 Aug 2024 16:58:22 +0200 (CEST) Message-ID: <8f0c2986-b790-86fa-7217-5491d6f7208f@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1723388302; bh=YejTjPxso1pe9SE60VPSVUYWQbJyPIbGHoIj3P7BOBk=; h=Date:To:Cc:From:Subject; b=C1rnDDNpXb5St4SejYmYrYhXTKfU/HrO8fAbOm9Kaeej0+QJl5rO7UZt9sxyuDgnO XK+iCGO3K9zsILCsOOE5w2y7hv7l9ybvZdwosRWTwwfNK8Mcv+p/B77HMBONcLnSvq GuUHNnihLUz9lD3+gdAlfu6Ikpvp2vzDB0BNgl+lHDUTN0I2hWAkuNyMuAWfIoLO6j f0dXvRavZ21wBDyfQdberLaHnaHqK75jZXci/zS7SqNirBFSvpfYTBx4mJcG9uacys lU+ogA/23u77rL3ezgLDsBqtKaShqtNBiQMTT8okyjkWhYWw+3qVqB/Zay51r4StDv 8KbI5/BZ6iNuQ== Date: Sun, 11 Aug 2024 22:57:52 +0800 MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset=UTF-8 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: , Reply-to: Adam Faiz X-ACL-Warn: , Adam Faiz via Guix-patches From: Adam Faiz via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 81EE06BAD2 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.95 X-Spam-Score: -6.95 X-TUID: pqUEdmTecQ5E >From 8b6035ad6587d44a9d65575b0f307820e42a402e Mon Sep 17 00:00:00 2001 Message-ID: <8b6035ad6587d44a9d65575b0f307820e42a402e.1723388041.git.adam.faiz@disroot.org> From: AwesomeAdam54321 Date: Wed, 7 Aug 2024 12:18:23 +0800 Subject: [PATCH v4] gnu: Add c3c-bootstrap. This patch was co-authored with Ashvith Shetty. * gnu/packages/c3.scm: New file. * gnu/packages/c3.scm (c3c-bootstrap): New variable. --- gnu/packages/c3.scm | 94 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 gnu/packages/c3.scm diff --git a/gnu/packages/c3.scm b/gnu/packages/c3.scm new file mode 100644 index 0000000000..d179a30356 --- /dev/null +++ b/gnu/packages/c3.scm @@ -0,0 +1,94 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Ashvith Shetty +;;; Copyright © 2024 Adam Faiz +;;; +;;; 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 (gnu packages c3) + #:use-module (gnu packages compression) + #:use-module (gnu packages libffi) + #:use-module (gnu packages llvm) + #:use-module (gnu packages python) + #:use-module (guix build-system cmake) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) + +(define-public c3c-bootstrap + (package + (name "c3c") + (version "0.6.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/c3lang/c3c") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0xjl3yghyqmqv9118nhcix3xywlpdirqc0dlmdaghdkja0wr19rw")) + (modules '((guix build utils))) + (snippet + #~(begin + ;; Unbundle miniz. + (delete-file-recursively "dependencies") + ;; Swap out miniz for zlib. + (substitute* "CMakeLists.txt" + (("add_library\\(miniz.*\\)\n$") + "find_package(ZLIB REQUIRED)\n") + (("target_include_directories\\(miniz PUBLIC") "") + (("...*/dependencies/miniz/..") "") + (("miniz") "z")) + (substitute* "src/utils/unzipper.c" + (("miniz\\.h") "zlib.h")))))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DCMAKE_INSTALL_LIBDIR=lib") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-build + (lambda _ + (substitute* "CMakeLists.txt" + (("\\$\\{LLVM_LIBRARY_DIRS\\}") + (string-append #$lld-18 "/lib/ " + #$llvm-18 "/lib/"))) + (substitute* '("src/compiler/target.c" + "src/compiler/linker.c") + (("\"cc\"") (string-append "\"" #$(cc-for-target) "\""))) + (substitute* "resources/testproject/project.json" + (("\"cc\" : \"cc\",") "")))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "../source/resources/testproject" + (invoke "../../../build/c3c" "build")) + (invoke "python3" "../source/test/src/tester.py" + "./c3c" "../source/test/test_suite") + (invoke "./c3c" "compile-test" "../source/test/unit"))))))) + (native-inputs (list python)) + (inputs (list libffi lld-18 llvm-18 zlib)) + (synopsis "Compiler for the C3 language") + (description + "C3 is a programming language that builds on the syntax and semantics +of the C language, with the goal of evolving it while still retaining +familiarity for C programmers.") + (home-page "https://c3-lang.org/") + (supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux")) + (license (list license:lgpl3 license:expat)))) base-commit: b20956651a53a8f23828fdeb6945e1a31e6997a8 -- 2.41.0