From da69ec31ed9d4c9002df09c921698d8e39f6ab31 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 31 Oct 2024 09:39:55 -0500 Subject: [PATCH 1/3] fastfetch: switch to apple-sdk_11 --- pkgs/by-name/fa/fastfetch/package.nix | 32 +++++++-------------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index fa590d9a3d1d..e80dd03e2c78 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -2,9 +2,10 @@ lib, stdenv, fetchFromGitHub, + apple-sdk_11, chafa, cmake, - darwin, + darwinMinVersionHook, dbus, dconf, ddcutil, @@ -23,7 +24,6 @@ nix-update-script, ocl-icd, opencl-headers, - overrideSDK, pcre, pcre2, pkg-config, @@ -43,10 +43,7 @@ waylandSupport ? true, x11Support ? true, }: -let - stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv; -in -stdenv'.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: { pname = "fastfetch"; version = "2.28.0"; @@ -105,24 +102,11 @@ stdenv'.mkDerivation (finalAttrs: { xorg.libXext ] ++ lib.optionals (x11Support && (!stdenv.hostPlatform.isDarwin)) [ xfce.xfconf ] - ++ lib.optionals stdenv.hostPlatform.isDarwin ( - with darwin.apple_sdk_11_0.frameworks; - [ - Apple80211 - AppKit - AVFoundation - Cocoa - CoreDisplay - CoreVideo - CoreWLAN - DisplayServices - IOBluetooth - MediaRemote - OpenCL - SystemConfiguration - moltenvk - ] - ); + ++ lib.optionals stdenv.hostPlatform.isDarwin ([ + apple-sdk_11 + moltenvk + (darwinMinVersionHook "10.13") + ]); cmakeFlags = [ From aeeb4c2f57db30ef16938d08c0c2972c1455fc20 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 31 Oct 2024 18:53:35 -0500 Subject: [PATCH 2/3] fastfetch: apple-sdk_11 -> apple-sdk_15 Upstream uses ifdefs and @available checks for SDK features so bump to latest SDK and set minimum. --- pkgs/by-name/fa/fastfetch/package.nix | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index e80dd03e2c78..38b1c3f9c5b9 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -2,10 +2,9 @@ lib, stdenv, fetchFromGitHub, - apple-sdk_11, + apple-sdk_15, chafa, cmake, - darwinMinVersionHook, dbus, dconf, ddcutil, @@ -103,9 +102,8 @@ stdenv.mkDerivation (finalAttrs: { ] ++ lib.optionals (x11Support && (!stdenv.hostPlatform.isDarwin)) [ xfce.xfconf ] ++ lib.optionals stdenv.hostPlatform.isDarwin ([ - apple-sdk_11 + apple-sdk_15 moltenvk - (darwinMinVersionHook "10.13") ]); cmakeFlags = From 8e829c0d333afc7691259d1583f045c69b734063 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Thu, 31 Oct 2024 19:05:05 -0500 Subject: [PATCH 3/3] fastfetch: use versionCheckHook No longer need manual version checking test and can verify on build. --- pkgs/by-name/fa/fastfetch/package.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index 38b1c3f9c5b9..e7195db779c9 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -29,8 +29,8 @@ python3, rpm, sqlite, - testers, util-linux, + versionCheckHook, vulkan-loader, wayland, xfce, @@ -140,14 +140,11 @@ stdenv.mkDerivation (finalAttrs: { --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath finalAttrs.buildInputs}" ''; - passthru = { - updateScript = nix-update-script { }; - tests.version = testers.testVersion { - package = finalAttrs.finalPackage; - command = "fastfetch -v | cut -d '(' -f 1"; - version = "fastfetch ${finalAttrs.version}"; - }; - }; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--version"; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; meta = { description = "An actively maintained, feature-rich and performance oriented, neofetch like system information tool";