Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openvsp: init at 3.40.1 #353536

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11266,6 +11266,12 @@
github = "keenanweaver";
githubId = 37268985;
};
kekschen = {
email = "[email protected]";
github = "kek5chen";
githubId = 52585984;
name = "Kek5chen";
};
keldu = {
email = "[email protected]";
github = "keldu";
Expand Down
117 changes: 117 additions & 0 deletions pkgs/by-name/op/openvsp/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
stdenv,
fetchFromGitHub,
cmake,
git,
pkg-config,
python3,
eigen,
fltk,
glm,
glew,
cminpack,
libxml2,
graphviz,
lib,
}:

stdenv.mkDerivation rec {
pname = "openvsp";
version = "3.40.1";

src = fetchFromGitHub {
owner = "OpenVSP";
repo = "OpenVSP";
rev = "OpenVSP_${version}";
hash = "sha256-PfXqnd75D06vER7X5w+VOm12mvLbcSe4sxmhtwBmPps=";
};

nativeBuildInputs = [
cmake
python3
git
];

# swig & doxygen are not included as the build would fail since it tries to call
# "swig -doxygen" which fails Make as this is not a valid command.
# Seems like an upstream problem.
buildInputs = [
cminpack
eigen
fltk
glew
glm
graphviz
libxml2
];

preConfigure = ''
mkdir -p build buildlibs
'';

configurePhase = ''
runHook preConfigure

cd buildlibs

cmake \
-DVSP_USE_SYSTEM_ADEPT2=false \
-DVSP_USE_SYSTEM_CLIPPER2=false \
-DVSP_USE_SYSTEM_CMINPACK=false \
-DVSP_USE_SYSTEM_CODEELI=false \
-DVSP_USE_SYSTEM_CPPTEST=false \
-DVSP_USE_SYSTEM_DELABELLA=false \
-DVSP_USE_SYSTEM_EIGEN=false \
-DVSP_USE_SYSTEM_EXPRPARSE=false \
-DVSP_USE_SYSTEM_FLTK=false \
-DVSP_USE_SYSTEM_GLEW=false \
-DVSP_USE_SYSTEM_GLM=false \
-DVSP_USE_SYSTEM_LIBIGES=false \
-DVSP_USE_SYSTEM_LIBXML2=false \
-DVSP_USE_SYSTEM_OPENABF=false \
-DVSP_USE_SYSTEM_PINOCCHIO=false \
-DVSP_USE_SYSTEM_STEPCODE=false \
-DVSP_USE_SYSTEM_TRIANGLE=false \
$src/Libraries \
-DCMAKE_BUILD_TYPE=Release

make -j$cores

cd ../build
cmake $src/src/ -DVSP_LIBRARY_PATH=$PWD/../buildlibs -DCMAKE_BUILD_TYPE=Release -DVSP_CPACK_GEN=DEB

runHook postConfigure
'';

buildPhase = ''
runHook preBuild

make -j$cores VERBOSE=1

runHook postBuild
'';

installPhase = ''
mkdir -p $out/bin

cp ./vsp/vsp $out/bin
cp ./vsp/vspscript $out/bin
cp ./src/vsp/vspviewer $out/bin
cp ./src/vsp/vspaero $out/bin
cp ./src/vsp/vsploads $out/bin
cp ./vsp_aero/Solver/vspaero $out/bin
cp ./vsp_aero/Solver/vspaero_complex $out/bin
cp ./vsp_aero/Solver/vspaero_opt $out/bin
cp ./vsp_aero/Solver/vspaero_adjoint $out/bin
cp ./vsp_aero/Viewer/vspviewer $out/bin
cp ./vsp_aero/Adb2Load/vsploads $out/bin
'';

meta = {
description = "A parametric aircraft geometry tool";
homepage = "https://openvsp.org/";
license = lib.licenses.nasa13;
maintainers = with lib.maintainers; [ kekschen ];
mainProgram = "vsp";
};
}