Unverified Commit 539826a5 authored by Theodore Ni's avatar Theodore Ni Committed by GitHub
Browse files

treewide: use new Darwin SDK pattern on some packages (#355156)

parents 97e5ddb3 b7cc5136
Loading
Loading
Loading
Loading
+0 −38
Original line number Diff line number Diff line
@@ -12,22 +12,6 @@
, libXinerama
, libXext
, libXcursor
, Foundation
, Cocoa
, Carbon
, CoreServices
, ApplicationServices
, CoreAudio
, CoreMIDI
, AudioToolbox
, Accelerate
, CoreImage
, IOKit
, AudioUnit
, QuartzCore
, WebKit
, DiscRecording
, CoreAudioKit

  # Enabling JACK requires a JACK server at runtime, no fallback mechanism
, withJack ? false, jack
@@ -61,11 +45,6 @@ stdenv.mkDerivation rec {
    "-DADLplug_Jack=${if withJack then "ON" else "OFF"}"
  ];

  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin (toString [
    # "fp.h" file not found
    "-isystem ${CoreServices}/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers"
  ]);

  NIX_LDFLAGS = toString (lib.optionals stdenv.hostPlatform.isDarwin [
    # Framework that JUCE needs which don't get linked properly
    "-framework CoreAudioKit"
@@ -96,23 +75,6 @@ stdenv.mkDerivation rec {
    libXinerama
    libXext
    libXcursor
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    Foundation
    Cocoa
    Carbon
    CoreServices
    ApplicationServices
    CoreAudio
    CoreMIDI
    AudioToolbox
    Accelerate
    CoreImage
    IOKit
    AudioUnit
    QuartzCore
    WebKit
    DiscRecording
    CoreAudioKit
  ] ++ lib.optional withJack jack;

  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+1 −3
Original line number Diff line number Diff line
{ lib, stdenv, rustPlatform, fetchFromGitHub, Security }:
{ lib, rustPlatform, fetchFromGitHub }:

rustPlatform.buildRustPackage rec {
  pname = "cloak";
@@ -13,8 +13,6 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-m11A5fcJzWoDZglrr2Es1V5ZJNepEkGeIRVhexJ7jws=";

  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security ];

  meta = with lib; {
    homepage = "https://github.com/evansmurithi/cloak";
    description = "Command-line OTP authenticator application";
+1 −3
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
, stdenv
, rustPlatform
, fetchFromGitHub
, AppKit
, libxcb
}:

@@ -19,8 +18,7 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-DMswC+Qp6w7Dcp5YYV4EGWUylv/ouG0ukAdCdDnOA/8=";

  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxcb ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ];
  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxcb ];

  meta = with lib; {
    homepage = "https://github.com/replydev/cotp";
+0 −3
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
, mpfr
, openblas
, readline
, Accelerate
, pkg-config
}:

@@ -39,8 +38,6 @@ stdenv.mkDerivation (finalAttrs: {
    mpfr
    openblas
    readline
  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
    Accelerate
  ];

  nativeBuildInputs = [
+1 −9
Original line number Diff line number Diff line
@@ -2,10 +2,7 @@
  fetchFromGitHub,
  gfold,
  lib,
  libiconv,
  rustPlatform,
  Security,
  stdenv,
  testers,
}:

@@ -20,16 +17,11 @@ rustPlatform.buildRustPackage {
    owner = "nickgerace";
    repo = pname;
    rev = version;
    sha256 = "sha256-7wTU+yVp/GO1H1MbgZKO0OwqSC2jbHO0lU8aa0tHLTY=";
    hash = "sha256-7wTU+yVp/GO1H1MbgZKO0OwqSC2jbHO0lU8aa0tHLTY=";
  };

  cargoHash = "sha256-idzw5dfCCvujvYr7DG0oOzQUIcbACtiIZLoA4MEClzY=";

  buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
    libiconv
    Security
  ];

  passthru.tests.version = testers.testVersion {
    package = gfold;
    command = "gfold --version";
Loading