From patchwork Tue Dec 5 00:55:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Palazzo X-Patchwork-Id: 173627 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3137775vqy; Mon, 4 Dec 2023 16:58:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHT86VFGfQ9eDjLnsuthUefWm7Pcr27WSN9st8ekDfFkBWlONJzUi1/zJYXgEnkXsHdlffq X-Received: by 2002:a05:620a:8c8b:b0:77e:fba3:81f8 with SMTP id ra11-20020a05620a8c8b00b0077efba381f8mr385878qkn.142.1701737892660; Mon, 04 Dec 2023 16:58:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701737892; cv=pass; d=google.com; s=arc-20160816; b=eLlLgH9aFsw8or9xtSo98YyO+8zCwReTrXkbRYRfXZYfdMsMuaqmVbj6jw549KXfaX V6tAyHRlCXUEe/8eB52RzlpuVO7H4iW/mlkzjmK7ljqoMNng7ldkJTkYJ4sLKPasrLDQ xnUyI7TW0gmBUX8dXmkYRkNHyNCHyAwpMscphpeybwArx5INHMG8U4wrT6ulq4KvL//X DjlNwwxXHV5X1GQByAINRqtI+q4OfnMBrRDmyX9zLlhGSGp0QdP2fnQQxlUJLCj7nNJN pfOCBxy6n7lkb6QjJeQVo6SJNbfgSCggs2ydddwk4hNhcSf1LYcfxhx63FU1T8WIqXPw jEbw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=mvnXS6OHw1K29Dh3KTDVXBn9aMQ92E3KAVS9dFu0dko=; fh=v7ed7HNR5d1BsZbBhyXgzAqLkhCgKw5S5rPu+Tw1Dxs=; b=r1EwOHkVwoNWiAswc+K1IxchUk5E7Col64CbzPybVYsxbrrYIYZkkyG/0HwP3dYigv hIKfdFMgou/z1hCDilWFVvWkPYFz1LCzXFF49OvW+SOXK3h9f8vvhis1JZvDOS4/VWC3 UrZduh33GoHRmRhgJou19HqNY/TPrrUbe+T5BbAbz4uE3mlLMsqLJ7zRpHKPTK197B02 p3JoY/Nmloj+iTFuEbh+9Wl4D+5GeWcwsWj7Pqf0mATIR7y82h4j7mH+tR0YbmI26/wv tDeAudydE+CU0MTD5cMJf8o5BLelUr37OwAUgwsVOMTQqLv/3iBMvy9ik9RchXdz5emQ 9hRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L49HrCFd; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cz34-20020a05620a36e200b0077d7b05742fsi10247974qkb.33.2023.12.04.16.58.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 16:58:12 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=L49HrCFd; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3268638312E4 for ; Tue, 5 Dec 2023 00:56:43 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id D3BD73870C37 for ; Tue, 5 Dec 2023 00:55:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D3BD73870C37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D3BD73870C37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701737761; cv=none; b=eaieX41mSS4olF5HBB7mOBoXLU00diXyoDU+EfDoBCiN9mQypU0lMahPTJKVu4kkfh2BswJzWaY8GpRjp5maKzraK+9cZeQhQDDrl+OStvRgZauzrwTx8Ey4+T91lxVTINaBH6QkgcB2S/iriT79XfIyRrA3aDQJPAyIr5aeXRs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701737761; c=relaxed/simple; bh=/8j//D9t5J/kNnkt4YujhqaCq+AjggwKEDAsplToKJs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=n76OnJswv2EdG2JtLcSiwgKbfmUvVbMUXEAI9TqCFd3TvWn2SptJ92GbBTnFm6QVHMvOrMD4OtdM5JGXR5iIMTRKgzNY1GoeTEuipTe1cAaOvzh/3V/wwlR85/C92+Kqis6otxtNk6aUn7yUMi7e51osCEAB7JxvtnbtvdejaFw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40859dee28cso50747515e9.0 for ; Mon, 04 Dec 2023 16:55:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701737749; x=1702342549; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=mvnXS6OHw1K29Dh3KTDVXBn9aMQ92E3KAVS9dFu0dko=; b=L49HrCFdsBeLWQvZFef53G7ROasiC4uZQDBBOOtCislRI/JKZ0t4ekqayO3VyRxLZG TC9kEtMxq3ZOFbRqoCpYAqagxaY2Nh8SR8ZG+ZdBVUZ9kjrjVSEn06efYcEA7/F4ZsT2 OxinKs0bGYHJG7TafBcUNd6Ovkgdweb5+JsiERnMdjyijZaVOtKGhraSsWNydlULBnCi 3GmPb5VpQh01JlzZisE1qKnaoMzXh8XiDkR/Yyi7ygT6YBzbsJZm43omlZjq94oh1PCN 2y+W4cb++IEMYRAIlu6lTSY9VRRaXAh4Hx7oGnANvw/1aYxgBPvqBYt/f0mteHdRrmfL rVUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701737749; x=1702342549; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mvnXS6OHw1K29Dh3KTDVXBn9aMQ92E3KAVS9dFu0dko=; b=Z9qjek0Jmv7QoROYITJCCDHmBbrcIyIw8Q1oFROzmThtJKJwmKJRE60yTbmou5aUAn 3thlmjQGNrz9vUAqQMd6jhpF23nsKcc2eBcBHYqBcWwJI26ln1z/kMwMlEPobs242yWv MXX6NPJ7Yn/gFo+BWdIdEq3uh+MnZg9M8KS4HnUE3MutL3I6szqlNS2iCNQZ8De1HUoX RHYGgzKo4JivRqVx5lDbyI3h2h9l7oD6M/1jPkm0VS6CDiXtzUtbuDIFsmdIoOUVTL02 C4TWJObxBD8tN2Cw/TjHxaqtl+jy9kdkerEN0TtxypIKm/fRSg2sYBdBm5gMPql2CMw/ 2eDQ== X-Gm-Message-State: AOJu0Yxoy/ohq2A4sM3T9dtC0KOLsySBikUwAV5rAHhsFpMkuhDgFd8Z sByYAzrgnpax3H3R8f8MgyQwJOCgz9fY11NBppA= X-Received: by 2002:a05:600c:81b:b0:40b:5e22:982 with SMTP id k27-20020a05600c081b00b0040b5e220982mr3825099wmp.113.1701737748728; Mon, 04 Dec 2023 16:55:48 -0800 (PST) Received: from localhost.localdomain ([146.70.126.208]) by smtp.gmail.com with ESMTPSA id p36-20020a05600c1da400b0040b478da760sm16991603wms.48.2023.12.04.16.55.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 16:55:48 -0800 (PST) From: Vincenzo Palazzo To: gcc-patches@gcc.gnu.org Cc: Vincenzo Palazzo Subject: [RFC PATCH 1/1] nix: add a simple flake nix shell Date: Tue, 5 Dec 2023 01:55:37 +0100 Message-ID: <20231205005541.38072-1-vincenzopalazzodev@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-8.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784401512374147560 X-GMAIL-MSGID: 1784401512374147560 This commit is specifically targeting enhancements in Nix support for GCC development. This initiative stems from the recognized need within our community for a more streamlined and efficient development process when using Nix. Signed-off-by: Vincenzo Palazzo --- flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 35 +++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000000..de713ff0da9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1696095070, + "narHash": "sha256-iDx02dT+OHYYgaRGJxp2HXvzSHkA9l8/3O8GJB2wttU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1f0e8ac1f9a783c4cfa0515483094eeff4315fe2", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000000..b0ff1915adc --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + description = "gcc compiler"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + packages = { + default = pkgs.gnumake; + }; + formatter = pkgs.nixpkgs-fmt; + + devShell = pkgs.mkShell { + buildInputs = [ + pkgs.gnumake + pkgs.gcc13 + + pkgs.gmp + pkgs.libmpc + pkgs.mpfr + pkgs.isl + pkgs.pkg-config + pkgs.autoconf-archive + pkgs.autoconf + pkgs.automake + ]; + }; + } + ); +}