{ description = "My cpp development shell"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; }; outputs = { self, nixpkgs, ... }: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; name = "change_this"; in { devShells."${system}" = { default = pkgs.mkShell { buildInputs = with pkgs; [ gcc gnumake ]; }; }; defaultPackage."${system}" = with pkgs; stdenv.mkDerivation { name = "${name}"; src = self; buildPhase = "g++ -o ${name} ./main.cpp"; installPhase = "mkdir -p $out/bin; install -t $out/bin ${name}"; }; }; }