diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index 8445767e7b78..cc30cd7a4881 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl +, IOKit ? null }: let version = "6.4"; @@ -18,6 +19,8 @@ stdenv.mkDerivation rec { sha256 = "11bsxcghh7adzdklcslamlynydxb708vfz892d5w7agdq405ddza"; }; + buildInputs = [] ++ stdenv.lib.optional stdenv.isDarwin IOKit; + patchPhase = '' cp ${driverdb} drivedb.h sed -i -e 's@which which >/dev/null || exit 1@alias which="type -p"@' update-smart-drivedb.in diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 914f31522002..3137da9d36c4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3498,7 +3498,9 @@ in slsnif = callPackage ../tools/misc/slsnif { }; - smartmontools = callPackage ../tools/system/smartmontools { }; + smartmontools = callPackage ../tools/system/smartmontools { + inherit (darwin.apple_sdk.frameworks) IOKit; + }; smbldaptools = callPackage ../tools/networking/smbldaptools { inherit (perlPackages) NetLDAP CryptSmbHash DigestSHA1;