From 51d05f5ba4f6ed2cbc6bcbbd5d4f760c995d53fa Mon Sep 17 00:00:00 2001 From: Raphael Date: Wed, 17 Sep 2025 18:08:25 +0200 Subject: [PATCH] core(nix/flake): adding flake for developpement on nixos --- flake.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b34baa6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,23 @@ +{ + description = "Flake for 42 C"; + + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + c_formatter_42.url = "github:maix-flake/c_formatter_42"; + }; + outputs = { self, nixpkgs, flake-utils, c_formatter_42 }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + packages = [ + c_formatter_42.packages.${system}.default + pkgs.clang + pkgs.clang-tools + pkgs.fastmod + pkgs.norminette + pkgs.tree + ] ++ (if pkgs.stdenv.isLinux then [ pkgs.valgrind ] else [ ]); + }; + }); +}