Guest User

Untitled

a guest
Oct 28th, 2025
50
0
364 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. {
  2. description = "A Nix-flake-based C/C++ development environment";
  3.  
  4. inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0"; # stable Nixpkgs
  5.  
  6. outputs =
  7. { self, ... }@inputs:
  8.  
  9. let
  10. supportedSystems = [
  11. "x86_64-linux"
  12. "aarch64-linux"
  13. "x86_64-darwin"
  14. "aarch64-darwin"
  15. ];
  16. forEachSupportedSystem =
  17. f:
  18. inputs.nixpkgs.lib.genAttrs supportedSystems (
  19. system:
  20. f {
  21. pkgs = import inputs.nixpkgs { inherit system; };
  22. }
  23. );
  24. in
  25. {
  26. devShells = forEachSupportedSystem (
  27. { pkgs }:
  28. {
  29. default =
  30. pkgs.mkShell.override
  31. {
  32. # Override stdenv in order to change compiler:
  33. # stdenv = pkgs.clangStdenv;
  34. }
  35. {
  36. packages =
  37. with pkgs;
  38. [
  39. clang-tools
  40. cmake
  41. codespell
  42. conan
  43. cppcheck
  44. doxygen
  45. gtest
  46. lcov
  47. vcpkg
  48. vcpkg-tool
  49. ]
  50. ++ (if system == "aarch64-darwin" then [ ] else [ gdb ]);
  51. };
  52. }
Advertisement
Add Comment
Please, Sign In to add comment