add nixos stuff
This commit is contained in:
32
default.nix
Normal file
32
default.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
with import <nixpkgs> { };
|
||||||
|
with pkgs;
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "AntSimulator";
|
||||||
|
version = "dev";
|
||||||
|
src = lib.cleanSource ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
sfml
|
||||||
|
];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
cmake .
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
make debug
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp AntSimulator $out/bin/
|
||||||
|
cp compile_commands.json $out/
|
||||||
|
'';
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
}
|
Reference in New Issue
Block a user