cxx-nix/flake.nix
2026-05-27 19:18:48 +02:00

54 lines
1.2 KiB
Nix

{
description = "A nix flake for c++ dev";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ...}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [
];
pkgs = import nixpkgs {
inherit system overlays;
config.allowUnfree = true;
};
stdenv = pkgs.gcc16Stdenv;
mkDevShell = {name, ...}: with pkgs; gcc16Stdenv.mkDerivation rec {
inherit name;
nativeBuildInputs = [
pkg-config
llvmPackages_22.libcxx
llvmPackages_22.libllvm
llvmPackages_22.clang
clang-tools
clang
gcc16
gdb
lld
rgp
mold
wild
ninja
];
buildInputs = [
udev alsa-lib-with-plugins vulkan-loader
libxkbcommon wayland
gcc16Stdenv.cc.cc.lib
];
LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs;
};
in {
devShells = {
default = mkDevShell {
name = "cxx-dev";
};
};
});
}