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: cleanup own packages to utilize the new apple-sdk #352699

Merged
merged 9 commits into from
Nov 7, 2024
10 changes: 0 additions & 10 deletions pkgs/by-name/co/comet-gog/package.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
protobuf,
darwin,
}:

let
inherit (darwin.apple_sdk.frameworks) CoreFoundation SystemConfiguration;
in
rustPlatform.buildRustPackage rec {
pname = "comet-gog";
version = "0.1.2";
Expand All @@ -31,11 +26,6 @@ rustPlatform.buildRustPackage rec {

env.PROTOC = lib.getExe' protobuf "protoc";

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

meta = {
changelog = "https://github.com/imLinguin/comet/releases/tag/v${version}";
description = "Open Source implementation of GOG Galaxy's Communication Service";
Expand Down
15 changes: 3 additions & 12 deletions pkgs/by-name/en/en-croissant/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
lib,
stdenv,
overrideSDK,
rustPlatform,
fetchFromGitHub,

Expand All @@ -16,15 +15,10 @@
libsoup,
webkitgtk_4_0,
gst_all_1,
darwin,
apple-sdk_11,
}:

let
buildRustPackage = rustPlatform.buildRustPackage.override {
stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
};
in
buildRustPackage rec {
rustPlatform.buildRustPackage rec {
pname = "en-croissant";
version = "0.11.1";

Expand Down Expand Up @@ -72,10 +66,7 @@ buildRustPackage rec {
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-good
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.Cocoa
darwin.apple_sdk_11_0.frameworks.WebKit
];
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];

doCheck = false; # many scoring tests fail

Expand Down
12 changes: 6 additions & 6 deletions pkgs/by-name/gc/gcs/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildGoModule,
buildNpmPackage,
fetchFromGitHub,
Expand All @@ -16,8 +17,7 @@
mupdf,
fontconfig,
freetype,
stdenv,
darwin,
apple-sdk_11,
}:

buildGoModule rec {
Expand Down Expand Up @@ -76,21 +76,21 @@ buildGoModule rec {

buildInputs =
[
mupdf
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libGL
libX11
libXcursor
libXrandr
libXinerama
libXi
libXxf86vm
mupdf
fontconfig
freetype
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk_11_0.frameworks.Carbon
darwin.apple_sdk_11_0.frameworks.Cocoa
darwin.apple_sdk_11_0.frameworks.Kernel
apple-sdk_11
];

# flags are based on https://github.com/richardwilkes/gcs/blob/master/build.sh
Expand Down
19 changes: 5 additions & 14 deletions pkgs/by-name/hi/hieroglyphic/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
glib,
gtk4,
libadwaita,
darwin,
gettext,
appstream,
}:

let
inherit (darwin.apple_sdk.frameworks) CoreFoundation Foundation;
in
stdenv.mkDerivation (finalAttrs: {
pname = "hieroglyphic";
version = "1.1.0";
Expand Down Expand Up @@ -53,16 +49,11 @@ stdenv.mkDerivation (finalAttrs: {
appstream
];

buildInputs =
[
glib
gtk4
libadwaita
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
CoreFoundation
Foundation
];
buildInputs = [
glib
gtk4
libadwaita
];

# needed for darwin
env.GETTEXT_DIR = "${gettext}";
Expand Down
14 changes: 5 additions & 9 deletions pkgs/by-name/ka/kando/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
stdenv,
buildNpmPackage,
fetchFromGitHub,
overrideSDK,

electron,
nodejs,
Expand All @@ -20,15 +19,10 @@
libXtst,
libXi,
wayland,
darwin,
apple-sdk_11,
}:

let
buildNpmPackage' = buildNpmPackage.override {
stdenv = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
};
in
buildNpmPackage' rec {
buildNpmPackage rec {
pname = "kando";
version = "1.4.0";

Expand Down Expand Up @@ -64,7 +58,9 @@ buildNpmPackage' rec {
libXi
wayland
]
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.AppKit ];
++ lib.optionals stdenv.isDarwin [
apple-sdk_11
];

dontUseCmakeConfigure = true;

Expand Down
12 changes: 1 addition & 11 deletions pkgs/by-name/ml/mlx42/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
fetchFromGitHub,
cmake,
glfw,
darwin,
enableShared ? !stdenv.hostPlatform.isStatic,
enableDebug ? false,
}:
Expand Down Expand Up @@ -33,16 +32,7 @@ stdenv.mkDerivation (finalAttrs: {

nativeBuildInputs = [ cmake ];

buildInputs =
[ glfw ]
++ lib.optionals stdenv.hostPlatform.isDarwin (
with darwin.apple_sdk.frameworks;
[
OpenGL
Cocoa
IOKit
]
);
buildInputs = [ glfw ];

cmakeFlags = [ (lib.cmakeBool "DEBUG" enableDebug) ];

Expand Down
6 changes: 0 additions & 6 deletions pkgs/by-name/pl/pls/package.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, darwin
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -18,10 +16,6 @@ rustPlatform.buildRustPackage rec {

cargoHash = "sha256-cDAHzK3pgpn5zEFdLBltf1e28yFFkXOzcF+nvDb8aWI=";

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

meta = {
changelog = "https://github.com/pls-rs/pls/releases/tag/${src.rev}";
description = "Prettier and powerful ls";
Expand Down
10 changes: 1 addition & 9 deletions pkgs/by-name/py/pyxel/package.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
lib,
stdenv,
python3,
fetchFromGitHub,
rustPlatform,
SDL2,
libiconv,
darwin,
}:

python3.pkgs.buildPythonApplication rec {
Expand Down Expand Up @@ -44,12 +41,7 @@ python3.pkgs.buildPythonApplication rec {
bindgenHook
];

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

env.NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2";

Expand Down
20 changes: 7 additions & 13 deletions pkgs/by-name/ri/ride/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
copyDesktopItems,
makeDesktopItem,
electron,
cctools,
apple-sdk_11,
}:

buildNpmPackage rec {
Expand Down Expand Up @@ -65,20 +65,14 @@ buildNpmPackage rec {
popd
'';

nativeBuildInputs =
[
zip
makeWrapper
]
++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ cctools ];
nativeBuildInputs = [
zip
makeWrapper
] ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ];

env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];

# Fix error: no member named 'aligned_alloc' in the global namespace
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0"
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";

# our patch adds the platform detecting build option
npmBuildFlags = "self";
Expand Down