-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is also very nice since it always supplies a known working version of the deps (xmake)
- Loading branch information
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
description = "Tilted C++ development environment"; | ||
|
||
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 | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
}; | ||
in | ||
{ | ||
devShells.default = pkgs.mkShell { | ||
buildInputs = with pkgs; [ | ||
gcc14 | ||
gdb | ||
libclang | ||
cmake | ||
xmake | ||
gnumake | ||
]; | ||
|
||
shellHook = '' | ||
# Unset environment variables, required for xmake to find | ||
# the linker/compiler that we provide here | ||
unset CC | ||
unset CXX | ||
unset LD | ||
unset AR | ||
unset AS | ||
unset RANLIB | ||
unset STRIP | ||
unset CFLAGS | ||
unset CXXFLAGS | ||
unset LDFLAGS | ||
echo "C++ development environment loaded" | ||
''; | ||
}; | ||
}); | ||
} |