From 749ed8cfbab817706ba8e85fca14ba7f50a1a004 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 31 Oct 2024 09:53:01 -0500 Subject: [PATCH 1/3] btop: switch to apple-sdk_11 --- pkgs/tools/system/btop/default.nix | 42 ++++++++++++++++-------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix index f49f77f6e22c..6d4444e3204b 100644 --- a/pkgs/tools/system/btop/default.nix +++ b/pkgs/tools/system/btop/default.nix @@ -1,16 +1,17 @@ -{ lib -, config -, stdenv -, fetchFromGitHub -, cmake -, darwin -, removeReferencesTo -, btop -, testers -, autoAddDriverRunpath -, cudaSupport ? config.cudaSupport -, rocmSupport ? config.rocmSupport -, rocmPackages +{ + lib, + config, + stdenv, + fetchFromGitHub, + cmake, + removeReferencesTo, + btop, + testers, + autoAddDriverRunpath, + apple-sdk_11, + cudaSupport ? config.cudaSupport, + rocmSupport ? config.rocmSupport, + rocmPackages, }: stdenv.mkDerivation rec { @@ -24,15 +25,16 @@ stdenv.mkDerivation rec { hash = "sha256-A5hOBxj8tKlkHd8zDHfDoU6fIu8gDpt3/usbiDk0/G0="; }; - nativeBuildInputs = [ - cmake - ] ++ lib.optionals cudaSupport [ - autoAddDriverRunpath - ]; + nativeBuildInputs = + [ + cmake + ] + ++ lib.optionals cudaSupport [ + autoAddDriverRunpath + ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk_11_0.frameworks.CoreFoundation - darwin.apple_sdk_11_0.frameworks.IOKit + apple-sdk_11 ]; installFlags = [ "PREFIX=$(out)" ]; From e04f0c4897cc264c4e1a9457fd06ff2c1ff511e1 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 31 Oct 2024 19:24:13 -0500 Subject: [PATCH 2/3] btop: apple-sdk_11 -> apple-sdk_15 --- pkgs/tools/system/btop/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix index 6d4444e3204b..ffcf0b6be42e 100644 --- a/pkgs/tools/system/btop/default.nix +++ b/pkgs/tools/system/btop/default.nix @@ -8,10 +8,11 @@ btop, testers, autoAddDriverRunpath, - apple-sdk_11, + apple-sdk_15, cudaSupport ? config.cudaSupport, rocmSupport ? config.rocmSupport, rocmPackages, + darwinMinVersionHook, }: stdenv.mkDerivation rec { @@ -34,7 +35,8 @@ stdenv.mkDerivation rec { ]; buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ - apple-sdk_11 + apple-sdk_15 + (darwinMinVersionHook "10.15") ]; installFlags = [ "PREFIX=$(out)" ]; From 29b57372646ba623945832431cfa103980217d74 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 31 Oct 2024 19:24:29 -0500 Subject: [PATCH 3/3] btop: add versionCheckHook --- pkgs/tools/system/btop/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/system/btop/default.nix b/pkgs/tools/system/btop/default.nix index ffcf0b6be42e..2a50e5933d3a 100644 --- a/pkgs/tools/system/btop/default.nix +++ b/pkgs/tools/system/btop/default.nix @@ -5,14 +5,13 @@ fetchFromGitHub, cmake, removeReferencesTo, - btop, - testers, autoAddDriverRunpath, apple-sdk_15, + darwinMinVersionHook, + versionCheckHook, + rocmPackages, cudaSupport ? config.cudaSupport, rocmSupport ? config.rocmSupport, - rocmPackages, - darwinMinVersionHook, }: stdenv.mkDerivation rec { @@ -50,9 +49,9 @@ stdenv.mkDerivation rec { patchelf --add-rpath ${lib.getLib rocmPackages.rocm-smi}/lib $out/bin/btop ''; - passthru.tests.version = testers.testVersion { - package = btop; - }; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; meta = with lib; { description = "Monitor of resources";