connect4/flake.nix

41 lines
861 B
Nix
Raw Permalink Normal View History

{
description = "C Development";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
2024-07-14 03:51:13 -07:00
mini-compile-commands = {
url = "github:danielbarter/mini_compile_commands";
flake = false;
};
};
2024-07-14 03:51:13 -07:00
outputs = { self, nixpkgs, mini-compile-commands }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
libs = with pkgs; [
git
gnumake
gcc
2024-07-14 03:51:13 -07:00
clang_16
clang-tools_16
lld_16
llvmPackages_16.libllvm
valgrind
gdb
2024-07-14 03:51:13 -07:00
cmake
gtest
];
in {
2024-07-14 03:51:13 -07:00
devShells.${system}.default =
with import nixpkgs { system = "${system}"; };
let mcc-env = (callPackage mini-compile-commands {}).wrap stdenv;
in (pkgs.mkShell.override {stdenv = mcc-env;}) {
buildInputs = libs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
};
};
}