mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
treewide: cleanup own packages to utilize the new apple-sdk (#352699)
This commit is contained in:
commit
b2127e7614
@ -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";
|
||||
@ -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";
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
overrideSDK,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
@ -16,8 +17,7 @@
|
||||
mupdf,
|
||||
fontconfig,
|
||||
freetype,
|
||||
stdenv,
|
||||
darwin,
|
||||
apple-sdk_11,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@ -76,6 +76,9 @@ buildGoModule rec {
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
mupdf
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libGL
|
||||
libX11
|
||||
libXcursor
|
||||
@ -83,14 +86,11 @@ buildGoModule rec {
|
||||
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
|
||||
|
@ -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";
|
||||
@ -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}";
|
||||
|
@ -3,7 +3,6 @@
|
||||
stdenv,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
overrideSDK,
|
||||
|
||||
electron,
|
||||
nodejs,
|
||||
@ -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";
|
||||
|
||||
@ -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;
|
||||
|
||||
|
@ -4,7 +4,6 @@
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
glfw,
|
||||
darwin,
|
||||
enableShared ? !stdenv.hostPlatform.isStatic,
|
||||
enableDebug ? false,
|
||||
}:
|
||||
@ -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) ];
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, darwin
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@ -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";
|
||||
|
@ -1,12 +1,9 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
python3,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
SDL2,
|
||||
libiconv,
|
||||
darwin,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
@ -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";
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
electron,
|
||||
cctools,
|
||||
apple-sdk_11,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
@ -65,21 +65,15 @@ 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 ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
|
||||
|
||||
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
|
||||
|
||||
# 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";
|
||||
|
||||
# our patch adds the platform detecting build option
|
||||
npmBuildFlags = "self";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user