Something went wrong. Try again.
Just a first repo to make sure I have tangled and everything set up correctly. I figured this would be a good way to say hello :)
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748{ description = "C++ dev environment";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }: let systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f { pkgs = import nixpkgs { inherit system; }; }); in { packages = forAllSystems ({ pkgs }: { default = pkgs.stdenv.mkDerivation { pname = "hello-cpp"; version = "0.1.0"; src = ./.; buildPhase = '' $CXX -std=c++17 -O2 -Wall -Wextra -o hello hello.cpp ''; installPhase = '' mkdir -p $out/bin cp hello $out/bin/ ''; }; });
devShells = forAllSystems ({ pkgs }: { default = pkgs.mkShell { packages = with pkgs; [ gcc gdb clang-tools cmake ]; }; });
apps = forAllSystems ({ pkgs }: { default = { type = "app"; program = "${self.packages.${pkgs.system}.default}/bin/hello"; }; }); };}