diff options
Diffstat (limited to 'pkgs/by-name/fa/fastfetch/package.nix')
-rw-r--r-- | pkgs/by-name/fa/fastfetch/package.nix | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/pkgs/by-name/fa/fastfetch/package.nix b/pkgs/by-name/fa/fastfetch/package.nix index 05723d9fa4a6..8713f1908602 100644 --- a/pkgs/by-name/fa/fastfetch/package.nix +++ b/pkgs/by-name/fa/fastfetch/package.nix @@ -2,9 +2,9 @@ lib, stdenv, fetchFromGitHub, + apple-sdk_15, chafa, cmake, - darwin, dbus, dconf, ddcutil, @@ -19,18 +19,18 @@ libsepol, libxcb, makeBinaryWrapper, + moltenvk, nix-update-script, ocl-icd, opencl-headers, - overrideSDK, pcre, pcre2, pkg-config, python3, rpm, sqlite, - testers, util-linux, + versionCheckHook, vulkan-loader, wayland, xfce, @@ -42,18 +42,15 @@ waylandSupport ? true, x11Support ? true, }: -let - stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv; -in -stdenv'.mkDerivation (finalAttrs: { +stdenv.mkDerivation (finalAttrs: { pname = "fastfetch"; - version = "2.25.0"; + version = "2.29.0"; src = fetchFromGitHub { owner = "fastfetch-cli"; repo = "fastfetch"; rev = finalAttrs.version; - hash = "sha256-I8In6JK9XWM29QdAj3wU2WHn/RsrDJo7s5S7R79HV8g="; + hash = "sha256-qXzE2v2BS1CgPVPIj+mct9zoJ4hpNCsTZ12keQThRZI="; }; outputs = [ @@ -77,7 +74,7 @@ stdenv'.mkDerivation (finalAttrs: { sqlite yyjson ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ dbus dconf ddcutil @@ -103,25 +100,11 @@ stdenv'.mkDerivation (finalAttrs: { xorg.libXdmcp xorg.libXext ] - ++ lib.optionals (x11Support && (!stdenv.isDarwin)) [ xfce.xfconf ] - ++ lib.optionals stdenv.isDarwin ( - with darwin.apple_sdk_11_0.frameworks; - [ - Apple80211 - AppKit - AVFoundation - Cocoa - CoreDisplay - CoreVideo - CoreWLAN - DisplayServices - IOBluetooth - MediaRemote - OpenCL - SystemConfiguration - darwin.moltenvk - ] - ); + ++ lib.optionals (x11Support && (!stdenv.hostPlatform.isDarwin)) [ xfce.xfconf ] + ++ lib.optionals stdenv.hostPlatform.isDarwin ([ + apple-sdk_15 + moltenvk + ]); cmakeFlags = [ @@ -138,10 +121,10 @@ stdenv'.mkDerivation (finalAttrs: { (lib.cmakeBool "ENABLE_X11" x11Support) (lib.cmakeBool "ENABLE_XCB" x11Support) (lib.cmakeBool "ENABLE_XCB_RANDR" x11Support) - (lib.cmakeBool "ENABLE_XFCONF" (x11Support && (!stdenv.isDarwin))) + (lib.cmakeBool "ENABLE_XFCONF" (x11Support && (!stdenv.hostPlatform.isDarwin))) (lib.cmakeBool "ENABLE_XRANDR" x11Support) ] - ++ lib.optionals stdenv.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ (lib.cmakeOptionType "filepath" "CUSTOM_PCI_IDS_PATH" "${hwdata}/share/hwdata/pci.ids") (lib.cmakeOptionType "filepath" "CUSTOM_AMDGPU_IDS_PATH" "${libdrm}/share/libdrm/amdgpu.ids") ]; @@ -157,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"; |