From 2c01688e6d701ad5f95eaade39b9f7ccab62948c Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 14 Nov 2024 23:19:40 +0100 Subject: [PATCH] build: pushing flake env --- .envrc | 1 + flake.nix | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .envrc create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b62b26c --- /dev/null +++ b/flake.nix @@ -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 + ]; + }; + } + ); +}