From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id +DTMOEIWs2YmAgEA62LTzQ:P1 (envelope-from ) for ; Wed, 07 Aug 2024 06:37:55 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id +DTMOEIWs2YmAgEA62LTzQ (envelope-from ) for ; Wed, 07 Aug 2024 08:37:55 +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="h/8clzd4"; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=XTDfh35a; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723012674; 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=jaPSzUjU2/sYbeSwY8ROCN44rTHH9Euq8qorh4w4j6w=; b=sIZ+VKA5BvpmwznKvMTch7WfUHpYVh+wSg7WQyuGDbYQgr6WuQDMDvlfw+OOLzvXzd64TV w0KuxH4klD2BH9PqKM+tTmeXhk+U74/yFu/Fz7M0jB31mjSAy4zujO90nnGedH1Fh6mAFr zvilION3W225ozhoom58VfbnVGvj6AoUs1FUNH1hmYq7LPIEB72cNPlEFEWtZTHn+R0Tl1 UWNh979xSZkF32mfgyA5mWNP5zK8zd618ep8H6YTBzyw0SerUHL8qz7cIfyL74EjGRPT7T mPr5aM1K42gSgW8pHWvF+AQ9Wtc31mElraHRjJNPSEVOltdQZ/ROsEMKUMgV2A== 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="h/8clzd4"; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=XTDfh35a; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723012674; a=rsa-sha256; cv=none; b=BlIm+y101g8YxiYes+2Mn96d+3p7MFzpvOhR0BKe0Oy3u0xM5WXFe2LtBh6dlNcgLr5lFX /0+CFgWb5bQ/OptCKOBm4xQeGBUnyK8UPydAMWAV68hve9PI6AaeV0hDRx7xbOqR61tQEc H8/QRrKEeGF5FVU3HiptNfThLERqMePDhomKSiNx2jqdtwGjNEnFIETkZIaHaiVOZGgyFT 3UjGcX8DtGAxS17mmRk4gCAFqtogwfM0DHmoh8lEUw/Juu3X9LTLh5eFptJCv0PvSJtSwG zzQ7mE0iEZF/n+xImZBeLmXX73ZKP2js1lFj+MazW0HugYphuIdIFct/hCxp/w== 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 04A1DEAE6 for ; Wed, 7 Aug 2024 08:37:54 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbaIl-0002nE-LB; Wed, 07 Aug 2024 02:37:39 -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 1sbaIj-0002mh-DX for guix-patches@gnu.org; Wed, 07 Aug 2024 02:37:37 -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 1sbaIj-0001Co-4t for guix-patches@gnu.org; Wed, 07 Aug 2024 02:37:37 -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=jaPSzUjU2/sYbeSwY8ROCN44rTHH9Euq8qorh4w4j6w=; b=h/8clzd4sAX6TZ+7TT95/rNi98WAtB1899vYpveXIwmxwJqDlTo8bmEXjEsfX+yjZjnm2MQr9qu9XkB1Hw6Dpwn+J0378WQ5X6ops+jD5mCEeUeacj1B+aaFw272v3rnnmnyNZgcTA0P32XlEadAEYBaNrhHEH5oJuBqEayh6W3gte3ZIFqaT/UG4+vSu1AkCRa+Mjv3kAaFzImWaUZ/F7I9we56CzY5hJ8mw0p/9YSnUke2O04YQ2cEDP0GUj0XM+EUGaevj+hmtrXcFV4q06c2p2GY+Q+bRRb56Cwsw3JPV4limLOqqFALlyMBL7gfb7vdiMFcAoEwpfxrzCrkFA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sbaJ7-0001LJ-Qz for guix-patches@gnu.org; Wed, 07 Aug 2024 02:38:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72494] [PATCH v3] gnu: Add c3c-bootstrap. References: In-Reply-To: Resent-From: Adam Faiz Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Aug 2024 06:38: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: ashvithshetty10@gmail.com Received: via spool by 72494-submit@debbugs.gnu.org id=B72494.17230126785151 (code B ref 72494); Wed, 07 Aug 2024 06:38:01 +0000 Received: (at 72494) by debbugs.gnu.org; 7 Aug 2024 06:37:58 +0000 Received: from localhost ([127.0.0.1]:33528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbaJ3-0001L0-MF for submit@debbugs.gnu.org; Wed, 07 Aug 2024 02:37:58 -0400 Received: from layka.disroot.org ([178.21.23.139]:46224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sbaJ0-0001Kj-8k for 72494@debbugs.gnu.org; Wed, 07 Aug 2024 02:37:55 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A434B41943; Wed, 7 Aug 2024 08:37:26 +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 R9WG0YZrBid8; Wed, 7 Aug 2024 08:37:25 +0200 (CEST) Message-ID: <25ba6326-a778-7f9e-1930-2d8d6c35375b@disroot.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1723012645; bh=gJMGp5W2tsGbv0ozrfWmwV6TWeGVSCfTDYfRojCUKoc=; h=Date:To:Subject:Cc:From; b=XTDfh35aFJNvvyx08GYCRDX9kbWRRvpCVJcvwL6AKCqj54qyxQqifGs4M2y0bQAID pFjpivywBYZyN58YmEcM8yJtzxHK25fyNzaPlLOO+T3NO3whtaIP3E9C1tM25glZ9e rg026Qe4h3jiQ+w7LJSrolA6cK9WslYDbahqMlyedKEg9m/d4UMeQGxnV3Nx49sleC ZquTWklUPjMVJoC27pEbZvSl+DGK8GMle/mWAyjIexj1k1NUHuDPK9IapYGnhVhLMx TPsdJF0fvT9DKfe8UR+XY0zWGn8vNC0d1rWe/jZuU7cBkpHD2lf9TXSdHuMnceffau YF1eo/D8tr89w== Date: Wed, 7 Aug 2024 14:36:48 +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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.95 X-Migadu-Queue-Id: 04A1DEAE6 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.95 X-TUID: SG7/W4+fKQP+ >From 3f9768c8fe5cc965170a74e5c018887793cb3ac0 Mon Sep 17 00:00:00 2001 Message-ID: <3f9768c8fe5cc965170a74e5c018887793cb3ac0.1723012269.git.adam.faiz@disroot.org> From: AwesomeAdam54321 Date: Wed, 7 Aug 2024 12:18:23 +0800 Subject: [PATCH v3] 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 | 92 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 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..2c5924807f --- /dev/null +++ b/gnu/packages/c3.scm @@ -0,0 +1,92 @@ +;;; 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 curl) + #: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)") + (("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/"))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "../source/resources/testproject" + (invoke "../../../build/c3c" + "--cc" #$(cc-for-target) "build")) + (invoke "python3" "../source/test/src/tester.py" + "./c3c" "../source/test/test_suite") + (invoke "./c3c" "--cc" #$(cc-for-target) + "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