balena-cli: switch to apple-sdk_12 (#352909)

This commit is contained in:
Doron Behar
2024-11-02 20:57:37 +02:00
committed by GitHub
+33 -31
View File
@@ -1,23 +1,19 @@
{ lib
, stdenv
, buildNpmPackage
, overrideSDK
, fetchFromGitHub
, testers
, balena-cli
, node-gyp
, python3
, udev
, cctools
, darwin
{
lib,
stdenv,
buildNpmPackage,
fetchFromGitHub,
testers,
balena-cli,
node-gyp,
python3,
udev,
cctools,
apple-sdk_12,
darwinMinVersionHook,
}:
let
# Fix for: https://github.com/NixOS/nixpkgs/issues/272156
buildNpmPackage' = buildNpmPackage.override {
stdenv = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
};
in buildNpmPackage' rec {
buildNpmPackage rec {
pname = "balena-cli";
version = "19.0.13";
@@ -35,19 +31,22 @@ in buildNpmPackage' rec {
'';
makeCacheWritable = true;
nativeBuildInputs = [
node-gyp
python3
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools
];
nativeBuildInputs =
[
node-gyp
python3
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
udev
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Foundation
darwin.apple_sdk.frameworks.Cocoa
];
buildInputs =
lib.optionals stdenv.hostPlatform.isLinux [
udev
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_12
];
passthru.tests.version = testers.testVersion {
package = balena-cli;
@@ -69,7 +68,10 @@ in buildNpmPackage' rec {
homepage = "https://github.com/balena-io/balena-cli";
changelog = "https://github.com/balena-io/balena-cli/blob/v${version}/CHANGELOG.md";
license = licenses.asl20;
maintainers = [ maintainers.kalebpace maintainers.doronbehar ];
maintainers = [
maintainers.kalebpace
maintainers.doronbehar
];
mainProgram = "balena";
};
}