Unverified Commit 92b163cb authored by moni-dz's avatar moni-dz
Browse files

contour: fix build on darwin

parent f3abd072
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -37,7 +37,10 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-jgasZhdcJ+UF3VIl8HLcxBayvbA/dkaOG8UtANRgeP4=";
  };

  patches = [ ./dont-fix-app-bundle.diff ];
  patches = lib.optionals stdenv.hostPlatform.isDarwin [
    ./dont-fix-app-bundle.diff
    ./remove-deep-flag-from-codesign.diff
  ];

  outputs = [
    "out"
@@ -82,17 +85,17 @@ stdenv.mkDerivation (finalAttrs: {
    mkdir -p $out/nix-support $terminfo/share
  ''
  + lib.optionalString stdenv.hostPlatform.isDarwin ''
    mkdir $out/Applications
    mkdir $out/Applications $out/bin
    cp -r $out/contour.app/Contents/Resources/terminfo $terminfo/share
    mv $out/contour.app $out/Applications
    ln -s $out/bin $out/Applications/contour.app/Contents/MacOS
    ln -s $out/Applications/contour.app/Contents/MacOS/contour $out/bin/contour
  ''
  + lib.optionalString stdenv.hostPlatform.isLinux ''
    mv $out/share/terminfo $terminfo/share/
    rm -r $out/share/contour
  ''
  + ''
    echo "$terminfo" >> $out/nix-support/propagated-user-env-packages
    rm -r $out/share/contour
  '';

  passthru.tests.test = nixosTests.terminal-emulators.contour;
+16 −0
Original line number Diff line number Diff line
diff --git a/remove-deep-flag-from-codesign.diff b/remove-deep-flag-from-codesign.diff
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/contour/CMakeLists.txt b/src/contour/CMakeLists.txt
index 3c7ac83720..55e6830bfc 100644
--- a/src/contour/CMakeLists.txt
+++ b/src/contour/CMakeLists.txt
@@ -510,7 +510,7 @@
         # Ensure code signature
         execute_process(
             WORKING_DIRECTORY \"${CMAKE_CURRENT_BINARY_DIR}\"
-            COMMAND codesign --force --deep --sign \"${CODE_SIGN_CERTIFICATE_ID}\" \"${BUNDLE_APP}\"
+            COMMAND codesign --force --sign \"${CODE_SIGN_CERTIFICATE_ID}\" \"${BUNDLE_APP}/Contents/MacOS/contour\"
         )
     ")
 else()