-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c43bdd1
commit a89e278
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env bash | ||
cmake -S . -B build -DACADOS_CPP_BUILD_TESTS=ON CMAKE_EXPORT_COMPILE_COMMANDS=ON | ||
cmake -S . -B build -DACADOS_CPP_BUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON |
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,50 @@ | ||
{ | ||
description = "C++ wrapper for ACADOS."; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs"; | ||
|
||
# acados.url = "github:adrian-kriegel/acados-nix"; | ||
}; | ||
|
||
outputs = { self, nixpkgs }: | ||
let | ||
pkgs = import nixpkgs { system = "x86_64-linux"; }; | ||
in { | ||
packages.x86_64-linux.acados-cpp = pkgs.stdenv.mkDerivation rec { | ||
pname = "acados-cpp"; | ||
version = "0.1.0"; | ||
|
||
src = ./.; | ||
|
||
# Intentionally not adding ACADOS as a dependency. ACADOSCpp is header-only | ||
# so nothing links to ACADOS and no build step is required. | ||
# Users can just use their own ACADOS installation. | ||
buildInputs = []; | ||
|
||
nativeBuildInputs = []; | ||
|
||
installPhase = '' | ||
mkdir -p $out/include | ||
cp -r ${src}/include/* $out/include | ||
mkdir -p $out/lib/cmake/${pname} | ||
cp ${src}/cmake/* $out/lib/cmake/${pname} | ||
''; | ||
|
||
meta = with pkgs.lib; { | ||
description = "C++ wrapper for ACADOS."; | ||
homepage = "https://github.com/adrian-kriegel/ACADOSCpp"; | ||
license = licenses.mit; | ||
maintainers = [ maintainers.adrian-kriegel ]; | ||
}; | ||
}; | ||
devShells.x86_64-linux.default = pkgs.mkShell { | ||
buildInputs = [ | ||
pkgs.cmake | ||
# Only adding acados in the dev shell. | ||
# import acados { inherit pkgs; } | ||
]; | ||
}; | ||
}; | ||
} |