build(nix): adding the flake for nix

This commit is contained in:
Raphael 2025-05-05 16:11:41 +02:00
parent e7cc81387e
commit 473e9df5d4
3 changed files with 175 additions and 0 deletions

31
flake.nix Normal file
View file

@ -0,0 +1,31 @@
{
description = "Flake utils demo";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
c_formatter_42.url = "github:maix0/c_formatter_42-flake";
};
outputs = {
self,
nixpkgs,
flake-utils,
c_formatter_42,
}:
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShell = pkgs.mkShell {
packages = [
pkgs.xorg.libX11
pkgs.xorg.libXext
pkgs.clang
pkgs.clang-tools
pkgs.norminette
c_formatter_42.packages.${system}.default
];
};
}
);
}