commit effc30e6a105d70fdb82eb5359961abd1e473370 Author: adjoly Date: Wed May 21 10:27:42 2025 +0200 「🎉」 init: hello world ! diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..7a2deec --- /dev/null +++ b/.clang-format @@ -0,0 +1,5 @@ +UseTab: Always +IndentWidth: 4 +TabWidth: 4 +AlignConsecutiveDeclarations: true +ConstructorInitializerIndentWidth: 4 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/.gitignore b/.gitignore new file mode 100644 index 0000000..96e6889 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.direnv +*.o +obj/ +compile_commands.json +.cache +*.d diff --git a/ex00/Makefile b/ex00/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7e193d4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,79 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1747744144, + "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1733096140, + "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" + } + }, + "pogit": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745683407, + "narHash": "sha256-KBxdhcU39pctJx1yVSxiWVRNazzBRtwch7NYjwstf5s=", + "owner": "y-syo", + "repo": "pogit", + "rev": "16adbe5cc1f39314761ec53d348cb86b60c901af", + "type": "github" + }, + "original": { + "owner": "y-syo", + "repo": "pogit", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "pogit": "pogit" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..1d23a50 --- /dev/null +++ b/flake.nix @@ -0,0 +1,35 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + pogit = { + url = "github:y-syo/pogit"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs@{ nixpkgs, ... }: + let + supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell.override + {} + { + hardeningDisable = [ "all" ]; + packages = with pkgs; [ + git + gdb + gcc11 + clang_12 + valgrind + compiledb + norminette + inputs.pogit.packages.${pkgs.system}.default + ]; + }; + }); + }; +}