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

This commit is contained in:
KeyZox committed 2024-10-31 13:41:36 +01:00
1 parent d3f431f511
commit d0f2837cd4
3 files changed
+28 -14

No files matched your search

+1
View File
@@ -0,0 +1 @@
use flake
+2
View File
@@ -1,3 +1,5 @@
obj/ obj/
ex00/megaphone ex00/megaphone
megaphone megaphone
.direnv
flake.lock
+25 -14
View File
@@ -2,23 +2,34 @@
description = "A Nix-flake-based C/C++ development environment"; description = "A Nix-flake-based C/C++ development environment";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 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 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 { in {
devShell.x86_64-linux = pkgs.mkShell { devShells = forEachSupportedSystem ({ pkgs }: {
buildInputs = with pkgs; [ default = pkgs.mkShell.override
gcc {}
clang {
gdb packages = with pkgs; [
norminette gcc
valgrind clang
git norminette
inputs.pogit.packages.${pkgs.system}.default valgrind
]; git
}; gdb
inputs.pogit.packages.${pkgs.system}.default
bear
];
};
});
}; };
} }