1
0
This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
modern_cpp_tutorial/.nix/flake.nix
2023-10-20 10:58:41 +02:00

33 lines
812 B
Nix

{
description = "A basic flake with a shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShell = pkgs.mkShell {
nativeBuildInputs = [ pkgs.bashInteractive ];
buildInputs = with pkgs; [
# building
gcc
cmake
ninja
sccache
# pre-commit
pre-commit
commitizen
];
shellHook = ''
pre-commit install --allow-missing-config --hook-type pre-commit --hook-type commit-msg
'';
};
}
);
}