public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20240131214520.142408-1-vincenzopalazzodev@gmail.com> (raw)

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

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
+          ];
+        };
+      }
+    );
+}
-- 
2.43.0


             reply	other threads:[~2024-01-31 21:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31 21:43 Vincenzo Palazzo [this message]
2024-01-31 22:19 ` Eli Schwartz
2024-02-01 21:04   ` Vincenzo Palazzo
  -- strict thread matches above, loose matches on Subject: below --
2023-12-05  0:55 Vincenzo Palazzo
2023-12-05  1:02 ` Andrew Pinski
2023-12-05  1:07   ` Jeff Law
2023-12-05  1:38     ` Vincenzo Palazzo
2023-12-05  1:54       ` Jeff Law
2023-12-05  2:01         ` Vincenzo Palazzo
2023-12-05  2:02           ` Vincenzo Palazzo
2023-12-05  4:25           ` Eli Schwartz
2023-12-05  8:59             ` Richard Biener
2023-12-05 10:35               ` Vincenzo Palazzo
2023-12-05 12:43                 ` Eli Schwartz
2023-12-11 16:10                   ` Vincenzo Palazzo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240131214520.142408-1-vincenzopalazzodev@gmail.com \
    --to=vincenzopalazzodev@gmail.com \
    --cc=eschwartz93@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).