1
0

🔨」 fix(Flake): No more skill issue in flake

This commit is contained in:
2024-10-31 13:41:36 +01:00
parent d3f431f511
commit d0f2837cd4
3 changed files with 28 additions and 14 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
obj/
ex00/megaphone
megaphone
.direnv
flake.lock

View File

@ -2,23 +2,34 @@
description = "A Nix-flake-based C/C++ development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
pogit.url = "github:y-syo/pogit";
pogit = {
url = "github:y-syo/pogit";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, pogit }:
outputs = inputs@{ nixpkgs, ... }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Use x86_64-linux as an example
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 {
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell.override
{}
{
packages = with pkgs; [
gcc
clang
gdb
norminette
valgrind
git
gdb
inputs.pogit.packages.${pkgs.system}.default
bear
];
};
});
};
}