Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 27 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
6fc16ed
bindle: use new Darwin SDK pattern
tjni Nov 10, 2024
ff4de5d
binserve: use new Darwin SDK pattern
tjni Nov 10, 2024
512e87a
cloak: use new Darwin SDK pattern
tjni Nov 10, 2024
f2ffd24
cotp: use new Darwin SDK pattern
tjni Nov 10, 2024
8079fe3
cocogitto: use new Darwin SDK pattern
tjni Nov 10, 2024
0fd590b
coldsnap: use new Darwin SDK pattern
tjni Nov 10, 2024
56aa8ec
dynein: use new Darwin SDK pattern
tjni Nov 10, 2024
b7cdb23
edgedb: use new Darwin SDK pattern
tjni Nov 10, 2024
7d98bd5
eludris: use new Darwin SDK pattern
tjni Nov 10, 2024
c4592c0
probe-rs-tools: use new Darwin SDK pattern
tjni Nov 10, 2024
527e6be
netclient: use new Darwin SDK pattern
tjni Nov 10, 2024
c57fe37
prisma-engines: use new Darwin SDK pattern
tjni Nov 10, 2024
2c6889b
vcpkg-tool: use new Darwin SDK pattern
tjni Nov 10, 2024
2dec13d
didyoumean: use new Darwin SDK pattern
tjni Nov 10, 2024
1327722
gretl: use new Darwin SDK pattern
tjni Nov 10, 2024
4e3f8b7
perseus-cli: use new Darwin SDK pattern
tjni Nov 10, 2024
878830c
adlplug: use new Darwin SDK pattern
tjni Nov 11, 2024
5e3f42b
awsbck: use new Darwin SDK pattern
tjni Nov 11, 2024
290355f
gh-cal: use new Darwin SDK pattern
tjni Nov 11, 2024
d9cb907
stargazer: use new Darwin SDK pattern
tjni Nov 11, 2024
224daf0
vrc-get: use new Darwin SDK pattern
tjni Nov 11, 2024
9a78e67
debase: use new Darwin SDK pattern
tjni Nov 11, 2024
487201b
gfold: use new Darwin SDK pattern
tjni Nov 11, 2024
4551bd2
git-absorb: use new Darwin SDK pattern
tjni Nov 11, 2024
83bd590
git-branchless: use new Darwin SDK pattern
tjni Nov 11, 2024
171c7bc
git-cinnabar: use new Darwin SDK pattern
tjni Nov 11, 2024
b7cc513
git-cliff: use new Darwin SDK pattern
tjni Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions pkgs/applications/audio/adlplug/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 ''
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/cloak/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, rustPlatform, fetchFromGitHub, Security }:
{ lib, rustPlatform, fetchFromGitHub }:

rustPlatform.buildRustPackage rec {
pname = "cloak";
Expand All @@ -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";
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/misc/cotp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
, stdenv
, rustPlatform
, fetchFromGitHub
, AppKit
, libxcb
}:

Expand All @@ -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";
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/science/math/gretl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
, mpfr
, openblas
, readline
, Accelerate
, pkg-config
}:

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

nativeBuildInputs = [
Expand Down
10 changes: 1 addition & 9 deletions pkgs/applications/version-management/gfold/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
fetchFromGitHub,
gfold,
lib,
libiconv,
rustPlatform,
Security,
stdenv,
testers,
}:

Expand All @@ -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";
Expand Down
4 changes: 1 addition & 3 deletions pkgs/applications/version-management/git-absorb/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles }:

rustPlatform.buildRustPackage rec {
pname = "git-absorb";
Expand All @@ -13,8 +13,6 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ installShellFiles ];

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

cargoHash = "sha256-Y/0In33y4mVTaE9yoBZ/3tRWcsSKgGjTCSHdjScNEj0=";

postInstall = ''
Expand Down
19 changes: 5 additions & 14 deletions pkgs/applications/version-management/git-branchless/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@
lib,
fetchFromGitHub,
git,
libiconv,
ncurses,
openssl,
pkg-config,
rustPlatform,
sqlite,
stdenv,
Security,
SystemConfiguration,
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -28,17 +25,11 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ pkg-config ];

buildInputs =
[
ncurses
openssl
sqlite
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Security
SystemConfiguration
libiconv
];
buildInputs = [
ncurses
openssl
sqlite
];

postInstall = lib.optionalString (with stdenv; buildPlatform.canExecute hostPlatform) ''
$out/bin/git-branchless install-man-pages $out/share/man
Expand Down
5 changes: 0 additions & 5 deletions pkgs/applications/version-management/git-cinnabar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
, curl
, zlib
, zstd
, libiconv
, CoreServices
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -35,9 +33,6 @@ stdenv.mkDerivation (finalAttrs: {
curl
zlib
zstd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
CoreServices
];

cargoDeps = rustPlatform.fetchCargoTarball {
Expand Down
6 changes: 0 additions & 6 deletions pkgs/applications/version-management/git-cliff/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
, stdenv
, fetchFromGitHub
, rustPlatform
, Security
, SystemConfiguration
, installShellFiles
}:

Expand All @@ -23,10 +21,6 @@ rustPlatform.buildRustPackage rec {
# attempts to run the program on .git in src which is not deterministic
doCheck = false;

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

nativeBuildInputs = [ installShellFiles ];

postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/de/debase/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
darwin,
apple-sdk_11,
fetchFromGitHub,
fetchpatch, # Delete at next version bump.
lib,
Expand Down Expand Up @@ -53,7 +53,7 @@ stdenv.mkDerivation rec {

buildInputs = [
libgit2
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk_11_0.frameworks.Foundation ];
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];

installPhase = ''
runHook preInstall
Expand Down
4 changes: 1 addition & 3 deletions pkgs/by-name/ne/netclient/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
, lib
, libX11
, stdenv
, darwin
}:

buildGoModule rec {
Expand All @@ -19,8 +18,7 @@ buildGoModule rec {

vendorHash = "sha256-ENrBJ0XbCfLfzTVZEVtDBjGxupdiLI7USGVImkYWDdY=";

buildInputs = lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.frameworks.Cocoa
++ lib.optional stdenv.hostPlatform.isLinux libX11;
buildInputs = lib.optional stdenv.hostPlatform.isLinux libX11;

hardeningEnabled = [ "pie" ];

Expand Down
7 changes: 2 additions & 5 deletions pkgs/by-name/pr/probe-rs-tools/package.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, cmake
, gitMinimal
, pkg-config
, libusb1
, openssl
, DarwinTools
, AppKit
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -34,9 +31,9 @@ rustPlatform.buildRustPackage rec {
# https://github.com/probe-rs/probe-rs/pull/2492
gitMinimal
pkg-config
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ DarwinTools ];
];

buildInputs = [ libusb1 openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ AppKit ];
buildInputs = [ libusb1 openssl ];

checkFlags = [
# require a physical probe
Expand Down
3 changes: 2 additions & 1 deletion pkgs/by-name/vc/vcpkg-tool/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, runtimeShell
, apple-sdk_11
, cacert
, cmake
, cmakerc
Expand Down Expand Up @@ -40,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
cmakerc
fmt
];
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];

patches = [
./change-lock-location.patch
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/tools/cocogitto/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, Security, libgit2 }:
{ lib, rustPlatform, fetchFromGitHub, installShellFiles, stdenv, libgit2 }:

rustPlatform.buildRustPackage rec {
pname = "cocogitto";
Expand All @@ -8,7 +8,7 @@ rustPlatform.buildRustPackage rec {
owner = "oknozor";
repo = pname;
rev = version;
sha256 = "sha256-yGwGWXME9ZjFJk/3pVDRTa1phG6kd8+YhXe/MxOEdF0=";
hash = "sha256-yGwGWXME9ZjFJk/3pVDRTa1phG6kd8+YhXe/MxOEdF0=";
};

cargoHash = "sha256-iS/nRfy63bgo7MeL/5jJ3Vn6S7dG49erIZ+0516YxKM=";
Expand All @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {

nativeBuildInputs = [ installShellFiles ];

buildInputs = [ libgit2 ] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
buildInputs = [ libgit2 ];

postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd cog \
Expand Down
6 changes: 2 additions & 4 deletions pkgs/development/tools/database/dynein/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{ fetchFromGitHub
, lib
, Security
, openssl
, pkg-config
, rustPlatform
, stdenv
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -15,7 +13,7 @@ rustPlatform.buildRustPackage rec {
owner = "awslabs";
repo = "dynein";
rev = "v${version}";
sha256 = "sha256-QhasTFGOFOjzNKdQtA+eBhKy51O4dFt6vpeIAIOM2rQ=";
hash = "sha256-QhasTFGOFOjzNKdQtA+eBhKy51O4dFt6vpeIAIOM2rQ=";
};

# Use system openssl.
Expand All @@ -27,7 +25,7 @@ rustPlatform.buildRustPackage rec {

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

preBuild = ''
export OPENSSL_DIR=${lib.getDev openssl}
Expand Down
3 changes: 1 addition & 2 deletions pkgs/development/tools/database/prisma-engines/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ fetchFromGitHub
, lib
, Security
, openssl
, pkg-config
, protobuf
Expand Down Expand Up @@ -42,7 +41,7 @@ rustPlatform.buildRustPackage rec {
buildInputs = [
openssl
protobuf
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ Security ];
];

preBuild = ''
export OPENSSL_DIR=${lib.getDev openssl}
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/tools/perseus-cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{ lib
, stdenv
, rustPlatform
, fetchCrate
, makeWrapper
, wasm-pack
, CoreServices
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -19,7 +17,6 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-i7MPmO9MoANZLzmR5gsD+v0gyDtFbzhsmE9xOsb88L0=";

nativeBuildInputs = [ makeWrapper ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices ];

postInstall = ''
wrapProgram $out/bin/perseus \
Expand Down
Loading