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 <vincenzopalazzo...@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