Unverified Commit 3b0bc3fc authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

qalculate-gtk: fix darwin build (#514649)

parents 6f0ab84c 9d92cbe4
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -2,10 +2,12 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  autoreconfHook,
  pkg-config,
  libqalculate,
  gtk3,
  gtk-mac-integration-gtk3,
  curl,
  wrapGAppsHook3,
  desktopToDarwinBundle,
@@ -22,6 +24,16 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-JZfolSRLRLtv529f25lEPYOlz+y+EdRqKA0Y5d1dK3s=";
  };

  patches = [
    # Is meaningfull only for Darwin but is better applying unconditionally.
    # Can be removed in 5.11 probably, see:
    # https://github.com/Qalculate/qalculate-gtk/pull/705
    (fetchpatch {
      url = "https://github.com/Qalculate/qalculate-gtk/commit/2f1b6a32d98f122d44d158c20f79a5b9aaf9669f.patch";
      hash = "sha256-v9T8wWvqlI9l6BUszf/575qmoFvh88Cdj/m2XqV8Q4k=";
    })
  ];

  hardeningDisable = [ "format" ];

  nativeBuildInputs = [
@@ -30,11 +42,16 @@ stdenv.mkDerivation (finalAttrs: {
    wrapGAppsHook3
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ];

  buildInputs = [
    libqalculate
    gtk3
    curl
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    gtk-mac-integration-gtk3
  ];

  enableParallelBuilding = true;

  meta = {