From patchwork Wed Jan 31 21:43:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Palazzo X-Patchwork-Id: 85109 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1585E3858005 for ; Wed, 31 Jan 2024 21:46:00 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 291ED3858D35 for ; Wed, 31 Jan 2024 21:45:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 291ED3858D35 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 291ED3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706737532; cv=none; b=Yh57DkrLBpUZLyKXpZ6P08gkCe+2DBaWKj/L6IJE/4x0S70KKIQEubEJ22M/osPG8Y9Ya45VOtc/sMtWuM7CwdapNkImafr9gVUHcuLm5d6NVWU8DJyeF5ZCDZlDuHcLiIQpSiW0jHpufF6NSZ1VWLFfEDMWKxGYTbcpyBmHasI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706737532; c=relaxed/simple; bh=fG/8vWcSXBEG4hplpagdQ43CBmI0bhCC0s/WwYlFzVg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=xCxvEM0ZbKJ/VvQkeJweL+5qeGxnKR8OZctAMKbadBb63MDUvEAU5ZIc7EH+VXBI5jjCTUz8sK5gE5SdZaWZThLM/mvAUIYNdn8JLliQ3Ks8FJWoZWhFWrzsUjP2Yz9NtuSTJ4KVM1yFLeHT72Cy5BCbJZcwUHUyP3yh9/Ftu+c= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40fb0c4bb9fso2585825e9.0 for ; Wed, 31 Jan 2024 13:45:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706737529; x=1707342329; 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=ZV3tFftIBuJpBXNeZTwV7pB5AO5d5nWBESQ3RWt5PQ8=; b=WUkYolNkOcxP+tiVxEh2ACCCKBBIxDCasun2Q7KYFktZI1vMwFyWaHyNy8GPqU4w6M UqZYBimipig6fyLZMQZTi9JT6Zo2BbnXFGfuRQ2MqpWqyvjb/hHmN18G8+lqlKcyCiRY T+GPVPgfbhYBqlLSDWlrggtLBudgvExUypVaRJL59mbvmG7ZojfiuOPaUSZUrQljX+5p aE6oLgZRrPfkuPib9oOicSXj2ybYvLbGNSUW+37p7xaL2WqStHzen7E9ofRBuS90oeff Iq1Ml8GuTEIwF6GQnVWCNz1oMqvUMWOECi1KEy/+nrvXo5W2dJOzSCfEKciKb2+TgKuz gxUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706737529; x=1707342329; 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=ZV3tFftIBuJpBXNeZTwV7pB5AO5d5nWBESQ3RWt5PQ8=; b=Je6Fhp4ps9eTI+19vFpOjnykt0r+gzxqpe+MiaPBd7JgotF7cIvuU/y+9x3thiPZgo HRTFH9nENSFodNSYa7r4DynquKrRtBR3yxd5j9u1LN2UCKN+rGIofiXc53VMsYUtMdP+ gWQpcULP7Sk9DUM/h5lFyyEvcHz0KeTQFesPe24LuMsgHKtaww45IQ3F1Xmxwc1Va4y3 zktsamv/hRfYzWFLxpl41XWJ5397s7j47uKkeWAMF0CC997h4gk86ldMv9+YJMiUELp3 tCnjnNISvCuGbG+HnysdzuD01T3b61RiYtyDX7KAH5JLUo0qZ/rFKuEAp/4iZcK9k6tV nl9g== X-Gm-Message-State: AOJu0YweMVtvr5brc2V3mYvjb4osD1TBIzR5ESy+sYPT6fy04/K0EWot PeElWtaK9VCsI0+DDaNlBsmMdL02KYhDMCU7Go4TM9rKe2Ii7BvAN3xB55m96rfz8w== X-Google-Smtp-Source: AGHT+IGHIPivQ/u3RrLtK2q6DJAiKUYJUnBPk1k8HtCDyyL3+sfKpqtwAPKMfZnczMzIFj3JgspTYA== X-Received: by 2002:a05:600c:4f11:b0:40f:afd2:61c9 with SMTP id l17-20020a05600c4f1100b0040fafd261c9mr2316495wmq.0.1706737528812; Wed, 31 Jan 2024 13:45:28 -0800 (PST) Received: from vincenzopalazzo-arch-dev.fritz.box ([2001:1620:71db:0:3841:133a:fab8:35a3]) by smtp.gmail.com with ESMTPSA id h7-20020a05600c314700b0040efcec0a6asm2604872wmo.42.2024.01.31.13.45.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 13:45:28 -0800 (PST) From: Vincenzo Palazzo To: gcc-patches@gcc.gnu.org, eschwartz93@gmail.com Cc: Vincenzo Palazzo Subject: [RFC PATCH 1/1] nix: add a simple flake nix shell Date: Wed, 31 Jan 2024 22:43:17 +0100 Message-ID: <20240131214520.142408-1-vincenzopalazzodev@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-8.7 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+patchwork=sourceware.org@gcc.gnu.org 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. Please not that in this case the Nix tool is used to define what should be in the dev environment, and not as a NixOS distro package manager. Signed-off-by: Vincenzo Palazzo --- .gitignore | 1 + contrib/nix/flake.nix | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 contrib/nix/flake.nix diff --git a/.gitignore b/.gitignore index 93a16b0b950..801b1d1709e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.patch *.orig *.rej +*.lock *~ .#* diff --git a/contrib/nix/flake.nix b/contrib/nix/flake.nix new file mode 100644 index 00000000000..b0ff1915adc --- /dev/null +++ b/contrib/nix/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 + ]; + }; + } + ); +}