From patchwork Thu Feb 1 20:56:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vincenzo Palazzo X-Patchwork-Id: 195461 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:9bc1:b0:106:209c:c626 with SMTP id op1csp23202dyc; Thu, 1 Feb 2024 13:06:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IEG7Ig2M/tYsANQvN5BSYMIGQ5CcHwqHvl21HSWSAsszF5jdEXSHC0ouXcNAQFHRLzefXCa X-Received: by 2002:a05:6214:b65:b0:68c:50fd:97b5 with SMTP id ey5-20020a0562140b6500b0068c50fd97b5mr6421318qvb.4.1706821607650; Thu, 01 Feb 2024 13:06:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706821607; cv=pass; d=google.com; s=arc-20160816; b=eXXB0yt4d5eTegryBpdDXZFhqNutb80f0nMeG61PtwZh5TRO5rBc7zagAnvmlW9xAN E/f2qObT9fKjUMlrjJNxt8DiZLpLDoOcz+TuGVrYkjDx+3vUuxysIKgF5+J2wqxXoDE6 o+euPnsIi3SykcwX+TMCnM39iHs1WOiMpWA4hvhsh5R/LJoQjbj+yhPHopBNMpkpqedT yNl3rzjjYbo4tIWQperLhzvwu9p6JFFe86yE5omXoGElLMe0wHiQtWt15wxX5XYsyJrw JyAaq5AKN1UBKpanT66ZvVVgowR8ChXDEPVFJm3gcucVThLeNjfXQMf1sgVL0u3KUR+4 fG2g== 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=DX4DbfFEL2t4ValP0eTIS1lavXBLfbNaF2SfKuUDeJA=; fh=elQbl9GVekTQimG4G94ImjeeBOWP8Yo3GZ4D7tmQXy0=; b=Loijyi18q3QB8xjou087Tl1WaMQQz9S0hghgWqNW7ZZs68kRm/ZMTTSIwrKhWN9VTc lO1DUMAIZy4sMFsyOukac84f0FrRAwPRLxRIETEsXOBUd4wD8VSgUw9Y2Jkl7bm18mp/ itMoJT2Ueku+04h93PDVtfi18FgqcfaEiaazKQbriZPiyzkK25mYFpHZXdNkdvFz/9tu ATmUs+wbny/25lEryaiT1cDLs1WKvNQG7Ix2weAniBCtrFDUl3eBzezOwf0kqjbhjPDh n5BBg/VHWNvD/pE9Va6Kd05hS6ONq8ga4Ytynua/XUedKa7vN4ffpu1uK0w99gx0x7V5 n4XA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YGdXp0kA; 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; AJvYcCVyfSqiVZCiUCDtrM6G1Vx+juvmyXuDVLgjDRyzEwtKLWwebHryasnWaBl06xPTwkL3tWaqJtHBhVFSq1keMBvNHpUufg== Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id m3-20020ad44b63000000b0068c444da3b1si344746qvx.538.2024.02.01.13.06.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 13:06:47 -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=YGdXp0kA; 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 521A13857B81 for ; Thu, 1 Feb 2024 21:06:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 4845938582BE for ; Thu, 1 Feb 2024 21:05:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4845938582BE 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 4845938582BE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::430 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706821560; cv=none; b=DxgCR4LCUBqB4Xqd6SjwzPvO+ERAUHOqtAgR0ppUpKQKtE3POk5HTT/5lTkvHgNWXDUtXABedV51rDdus+GPap5hizKRZZo3+RNK6bw1bKMdYc3vBp4kz7gxBhQFzBQtP8BgmyBxV8jNkhrg5MlULSGQWwb7IX+w6hygr07f7Q4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706821560; c=relaxed/simple; bh=gop6LiDPj1iroqVS7JnfStnX5R0nsm5CGhn17sCt9V0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SDK+pHwFBYAGlbvx2UJwWFc6G6Q1OmxvRR/u1wpCV78jo0cI3Tmu5V7OKTA0XyFsf6EeFNDyCfckoCfjv/l9IXeLvrM3/eT+/fvy41RevM8UBdiDALuSMiQ8R4wEKnEGjTFilWdUKAlBkIaynpof+Djd7WWuCCyjAtWZxsyBxeg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-33934567777so877193f8f.1 for ; Thu, 01 Feb 2024 13:05:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706821557; x=1707426357; 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=DX4DbfFEL2t4ValP0eTIS1lavXBLfbNaF2SfKuUDeJA=; b=YGdXp0kA6KdalXuZcSfo4VWp9WOTnFr+4W3sDlLIM2rPyeubSkOAnP9pg02DnNcaoh aej62eHczfD9hAWanYlUZozBe8XyflFZxHpaRLeI91qZmbTjIDY4dwJdqD4pTQNY9uM1 UgG+vPZOERDK0WkJV/f5+6Qzn0B037c9ex4NdWGzkuU3+7cVIRP+vJS/gYB/4/IXkK3x 7Aatw4rjWlq47tRefJNvvGavTW+zf6u26PlIxLbgobBSMClPbrDFwhxpmKtbxEui5yUY FOKty6r3cnmPU328T0q+/ZUA3bOFwU5/5lKDZ9axI0lMuF6SvYFHffmVtOIUZN2nIn2/ aIZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706821557; x=1707426357; 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=DX4DbfFEL2t4ValP0eTIS1lavXBLfbNaF2SfKuUDeJA=; b=DIk0sA3+IWPMjpScmk9M+vQXeSXhqgjTXfJ19biCyVTTGefk4btNW/YhQ3xqlEf/uF 9IPFb/0VQ8HorQZCOaxT90Q0FVcv8zyvPhJJUCf1feE7MpNC+I1L9ZU35j8LwHXMMvTO AwjYAMKDVzOHOiYvDylY1SVBTp8y/4EkVJroQVhcqZbA25A3rnUXgrwvoa6FAMIWieXP odlmRqE80NOuFzYBiOZdUFfdjMfMjBqU68QEtCvXaL1vgL7uhQj9bIG3ZiYgpguQxJS6 rCgLlef2sO6XskU3nSLwhvxsuvZ/28i7jQuX39uGRwu9JypE4hTHpALUg9nGGoHlvBEG UO4g== X-Gm-Message-State: AOJu0YxRwPGul1IiVM31EW0KI1YncHhxAluqhz8ELoFkIe247HqUWxlA 3jzHr+iZJALSvyYYB9i9o+2vY5gPPW1i84ln/CZts1s0KnnXU6r5IRS5cy1zTgQ= X-Received: by 2002:a5d:55c4:0:b0:33b:1b4a:9971 with SMTP id i4-20020a5d55c4000000b0033b1b4a9971mr917857wrw.36.1706821527219; Thu, 01 Feb 2024 13:05:27 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUiudPROnheYr6KEoJ744dVHfByb35S5SLMHf7hJ1AA/cygnJu+sFTIbEGo3nMxogYimHQpOvTUID3BKpm//wz0R63eVTCU/g== Received: from vincenzopalazzo-arch-dev.fritz.box ([2001:1620:71db:0:cc57:871f:84ee:1b83]) by smtp.gmail.com with ESMTPSA id q17-20020a05600000d100b0033af350fb88sm330619wrx.25.2024.02.01.13.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 13:05:26 -0800 (PST) From: Vincenzo Palazzo To: eschwartz93@gmail.com, gcc-patches@gcc.gnu.org Cc: Vincenzo Palazzo Subject: [RFC PATCH v3] nix: add a simple flake nix shell Date: Thu, 1 Feb 2024 21:56:38 +0100 Message-ID: <20240201210523.1034972-1-vincenzopalazzodev@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-9.8 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: 1789644059153696566 X-GMAIL-MSGID: 1789732173869527669 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 --- v3: 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 @@ -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 + ]; + }; + } + ); +}