build(nix): adding nix flake
- Allow to all people on nix package manager to have the same env
This commit is contained in:
parent
63a1b2abdf
commit
e1625857f2
2 changed files with 29 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -53,3 +53,8 @@ Module.symvers
|
|||
Mkfile.old
|
||||
dkms.conf
|
||||
.clangd
|
||||
|
||||
# Nix files
|
||||
*.lock
|
||||
.envrc
|
||||
.direnv/
|
||||
|
|
|
|||
24
flake.nix
Normal file
24
flake.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
description = "Flake for 42 C";
|
||||
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
c_formatter_42.url = "github:maix0/c_formatter_42-flake";
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-utils, c_formatter_42, }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
devShell = pkgs.mkShell {
|
||||
packages = [
|
||||
c_formatter_42.packages.${system}.default
|
||||
pkgs.clang
|
||||
pkgs.clang-tools
|
||||
pkgs.fastmod
|
||||
pkgs.norminette
|
||||
pkgs.valgrind
|
||||
pkgs.tree
|
||||
] ++ (if pkgs.stdenv.isLinux then [ pkgs.valgrind ] else [ ]);
|
||||
};
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue