Message ID | 20240131214520.142408-1-vincenzopalazzodev@gmail.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:106:209c:c626 with SMTP id mn5csp42800dyc; Wed, 31 Jan 2024 13:46:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGchWTd0uIgwjyP7y7FuNWJbABaQrpeVXsXfN8kuY2uWu7aE9DIMUtus3+HX444xtn6a6Dh X-Received: by 2002:a05:622a:15c4:b0:42a:9a7b:9872 with SMTP id d4-20020a05622a15c400b0042a9a7b9872mr812693qty.37.1706737574556; Wed, 31 Jan 2024 13:46:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706737574; cv=pass; d=google.com; s=arc-20160816; b=FXDFU1GochRwgsdluPSG59O6L/+oEf7XGtmr829tU2Aiq6PEUSG5VkZxQuOvu94cGB AyLM0jM5O39+djtQy8OYWg5IaDoafLlqc9Py+bTSSIpNBfaN9hne9NF4AHnbCIHC3rv+ 6UiZpSfI01D47u1fGjDyjnJPrLHexEumOzmDmfJLBnPGhw9Lpu/9mV7pdT7QWph7+kLz kI4+M2KBFlGRkNNujasriCnT+HSDDbhrcrhw9YXoTbrtNovrWj5mRxcDbUsHnS1futQN rEjbDKYxBJSq3+VL6G7oYwpE73MMQ41C90tMLO1xLCWP65DC3fNwTJ58j4zO5IXe71Ct +CxQ== 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=ZV3tFftIBuJpBXNeZTwV7pB5AO5d5nWBESQ3RWt5PQ8=; fh=ozScBMUf0/9ow1G6M/YzLXyEgz0sakAxL+NgDUON9v4=; b=gP5CjM6buh02XzSGdbq/pCTO3c/meYuGjKX0/Yn93YeE2cZ3A3mGSxDO+Mymw5XlKM /n+Ldmte6tOq3m3Aus7UXbT5Ntpzevd27PBIZoRXllWoUJcBmV5YquQEz98ps7/xA0Dl 7wLH61eY2cx5wYgOkpvG3ExyFVh4czLJ5aJFyYmURL6ZI8Fqbf8UpYCzFoltNceoF+BR ksK3ulOSSCu02Gy0sCiA/qGfxtyWaEeauofUuuSjRMYrLl8iRBsLVg9vNppatN4GrCCE oveDvtYeaw42FPDqFvrWuN7X2eChfOOusuAw/8jNN9vmmnMJCHGspZ2YMEIjEWWM4MWR f9og==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WUkYolNk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 X-Forwarded-Encrypted: i=1; AJvYcCXAMNS33J7OcljO2ztpkHoVSeopNaHDTIi6M0xannsYR3n9k0lgxX6yfI7KAvEIKBfpZ6bMLqzuTCcPYCuLOxfkE4TA0Q== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id c5-20020ac85a85000000b0042bdfbf7785si3522599qtc.406.2024.01.31.13.46.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 13:46:14 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WUkYolNk; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 3654F385843A for <ouuuleilei@gmail.com>; Wed, 31 Jan 2024 21:46:14 +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 <gcc-patches@gcc.gnu.org>; 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 <gcc-patches@gcc.gnu.org>; 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-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 <vincenzopalazzodev@gmail.com> To: gcc-patches@gcc.gnu.org, eschwartz93@gmail.com Cc: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> 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 Content-Transfer-Encoding: 8bit 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789644059153696566 X-GMAIL-MSGID: 1789644059153696566 |
Series |
Nix Environment Support for GCC Development
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Vincenzo Palazzo
Jan. 31, 2024, 9:43 p.m. UTC
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 <vincenzopalazzodev@gmail.com>
---
.gitignore | 1 +
contrib/nix/flake.nix | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
create mode 100644 contrib/nix/flake.nix
Comments
On 1/31/24 4:43 PM, Vincenzo Palazzo wrote: > 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 <vincenzopalazzodev@gmail.com> > --- I was originally trying to figure out what the idea behind this patch was, as I recalled discussing the patch before. Then I double checked the mailing list and saw: https://inbox.sourceware.org/gcc-patches/20240131214259.142253-1-vincenzopalazzodev@gmail.com/T/#u One thing that can potentially reduce confusion here is: - use git send-email -v2 to mark the patch as an update to an existing patch. - Use the --annotate option, and edit the patch before sending it. Right here, after the "---" and in the same semantic patch section as the diffstat, you can put arbitrary non-patch commentary. It is essentially comments for patches -- it won't be included in the commit message when the patch is applied with `git am`. It is common to insert something that looks like this: v2: moved the flake to contrib/ instead of installing it at the root of the repository > .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
Hi Eli, Yeah sorry I forgot to tag with -v2, so I am creating a -v3, after a while that I do not use email to send patches I get a little bit rusty. Thanks for your useful feedback, I am sending the v3 now. Cheers, Vincent. On Wed, Jan 31, 2024 at 11:19 PM Eli Schwartz <eschwartz93@gmail.com> wrote: > > On 1/31/24 4:43 PM, Vincenzo Palazzo wrote: > > 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 <vincenzopalazzodev@gmail.com> > > --- > > > I was originally trying to figure out what the idea behind this patch > was, as I recalled discussing the patch before. Then I double checked > the mailing list and saw: > > https://inbox.sourceware.org/gcc-patches/20240131214259.142253-1-vincenzopalazzodev@gmail.com/T/#u > > One thing that can potentially reduce confusion here is: > > - use git send-email -v2 to mark the patch as an update to an existing > patch. > > - Use the --annotate option, and edit the patch before sending it. Right > here, after the "---" and in the same semantic patch section as the > diffstat, you can put arbitrary non-patch commentary. It is > essentially comments for patches -- it won't be included in the commit > message when the patch is applied with `git am`. It is common to > insert something that looks like this: > > > v2: moved the flake to contrib/ instead of installing it at the root of > the repository > > > > > .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 > > > > -- > Eli Schwartz
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 + ]; + }; + } + ); +}