Commit 93ccd7bb authored by Weijia Wang's avatar Weijia Wang
Browse files

sound-of-sorting: fix darwin build

parent 55f55535
Loading
Loading
Loading
Loading
+23 −9
Original line number Diff line number Diff line
@@ -2,10 +2,10 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  pkg-config,
  SDL2,
  wxGTK32,
  darwin,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -19,17 +19,31 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-cBrTvFoz6WZIsh5qPPiWxQ338Z0OfcIefiI8CZF6nn8=";
  };

  patches = [
    (fetchpatch {
      url = "https://github.com/freebsd/freebsd-ports/raw/31ec0266e31910c16b0f69e16a2a693aae20abdf/math/sound-of-sorting/files/patch-src_SortAlgo.cpp";
      extraPrefix = "";
      hash = "sha256-mOo3GsEZ8r8p9ROoel2TO9Z4yF5SmCN0/fUn/2qUKAo=";
    })
    (fetchpatch {
      url = "https://github.com/freebsd/freebsd-ports/raw/31ec0266e31910c16b0f69e16a2a693aae20abdf/math/sound-of-sorting/files/patch-src_SortAlgo.h";
      extraPrefix = "";
      hash = "sha256-NNSPs0gT6ndeMQWHLHAwLR5nMQGP880Qd6kulDYJYF0=";
    })
    (fetchpatch {
      url = "https://github.com/freebsd/freebsd-ports/raw/31ec0266e31910c16b0f69e16a2a693aae20abdf/math/sound-of-sorting/files/patch-src_SortArray.cpp";
      extraPrefix = "";
      hash = "sha256-WxqwcZ2L9HPG4QNf1Xi624aKTM3cRBWN+W00htcIJ5k=";
    })
  ];

  nativeBuildInputs = [
    pkg-config
  ];

  buildInputs =
    [
  buildInputs = [
    wxGTK32
    SDL2
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      darwin.apple_sdk.frameworks.Cocoa
  ];

  meta = {