public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/1] nix: add a simple flake nix shell
@ 2023-12-05  0:55 Vincenzo Palazzo
  2023-12-05  1:02 ` Andrew Pinski
  0 siblings, 1 reply; 15+ messages in thread
From: Vincenzo Palazzo @ 2023-12-05  0:55 UTC (permalink / raw)
  To: gcc-patches; +Cc: Vincenzo Palazzo

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 <vincenzopalazzodev@gmail.com>
---
 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
+          ];
+        };
+      }
+    );
+}
-- 
2.43.0


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [RFC PATCH 1/1] nix: add a simple flake nix shell
@ 2024-01-31 21:43 Vincenzo Palazzo
  2024-01-31 22:19 ` Eli Schwartz
  0 siblings, 1 reply; 15+ messages in thread
From: Vincenzo Palazzo @ 2024-01-31 21:43 UTC (permalink / raw)
  To: gcc-patches, eschwartz93; +Cc: Vincenzo Palazzo

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-02-01 21:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05  0:55 [RFC PATCH 1/1] nix: add a simple flake nix shell 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
2024-01-31 21:43 Vincenzo Palazzo
2024-01-31 22:19 ` Eli Schwartz
2024-02-01 21:04   ` Vincenzo Palazzo

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).