This commit is contained in:
Awen Lelu
2026-01-06 16:35:32 +01:00
parent 3e28ea4d9f
commit 5041f3c541
13 changed files with 110 additions and 4834 deletions

View File

@@ -1,39 +1,55 @@
{
description = "Environnement de développement Elixir pour la simulation d'apocalypse zombie";
description = "A Nix-flake-based C/C++ development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0"; # stable Nixpkgs
outputs =
{ self, ... }@inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem =
f:
inputs.nixpkgs.lib.genAttrs supportedSystems (
system:
f {
pkgs = import inputs.nixpkgs { inherit system; };
}
);
in
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
name = "elixir-zombie-dev";
packages = with pkgs; [
elixir
erlang
elixir-ls
librsvg
];
shellHook = ''
echo "🧟 Environnement Elixir prêt"
echo " Lance : iex zombie_apocalypse.ex"
'';
};
}
);
devShells = forEachSupportedSystem (
{ pkgs }:
{
default =
pkgs.mkShell.override
{
# Override stdenv in order to change compiler:
# stdenv = pkgs.clangStdenv;
}
{
packages =
with pkgs;
[
clang-tools
cmake
codespell
conan
cppcheck
doxygen
gtest
lcov
vcpkg
vcpkg-tool
]
++ (if stdenv.hostPlatform.system == "aarch64-darwin" then [ ] else [ gdb ]);
};
}
);
};
}