Unverified Commit d84c59de authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

opencsg: fix (#411715)

parents f646c51d 76d13bcc
Loading
Loading
Loading
Loading
+5 −11
Original line number Diff line number Diff line
@@ -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,18 +39,10 @@ stdenv.mkDerivation (finalAttrs: {

  doCheck = false;

  postInstall =
    ''
  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;

  postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
    app=$out/Applications/opencsgexample.app/Contents/MacOS/opencsgexample
    install_name_tool -change \
+8 −0
Original line number Diff line number Diff line
--- 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
 )