commit 5bf0606b79d403591aea138aa4384499a0b419ae Author: janis Date: Wed May 27 19:18:48 2026 +0200 initial commit, somehow diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c5e45df --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1779560665, + "narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d77fc3f --- /dev/null +++ b/flake.nix @@ -0,0 +1,53 @@ +{ + 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"; + }; + }; + }); +}