opencsg: fix

This commit is contained in:
emaryn 2025-05-28 19:26:55 +08:00
parent bfbf67f8bb
commit 76d13bcc5e
2 changed files with 13 additions and 11 deletions

View file

@ -22,6 +22,8 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-r8wASontO8R4qeS6ObIPPVibJOI+J1tzg/kaWQ1NV8U=";
};
patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./opencsgexample.patch ];
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs =
@ -37,17 +39,9 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = false;
postInstall =
''
install -D ../copying.txt "$out/share/doc/opencsg/copying.txt"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/*.app $out/Applications
rmdir $out/bin || true
'';
dontWrapQtApps = true;
postInstall = ''
install -D ../copying.txt "$out/share/doc/opencsg/copying.txt"
'';
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample

View file

@ -0,0 +1,8 @@
--- a/example/CMakeLists.txt
+++ b/example/CMakeLists.txt
@@ -19,4 +19,5 @@
install(TARGETS opencsgexample
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ BUNDLE DESTINATION ${CMAKE_INSTALL_PREFIX}/Applications
)