「🔨」 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
+20 -6

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
+17 -6
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
{}
{
packages = with pkgs; [
gcc gcc
clang clang
gdb
norminette norminette
valgrind valgrind
git git
gdb
inputs.pogit.packages.${pkgs.system}.default inputs.pogit.packages.${pkgs.system}.default
bear
]; ];
}; };
});
}; };
} }