smartmontools: fix darwin build
needs IOKit
commitc92227f5cc223f1d424fa4aa4feda120b66f21eb
authorMatthew Bauer <mjbauer95@gmail.com>
dateFri 12 Aug 2016, 00:11 (10 years ago)
parent20e86e1
pkgs/tools/system/smartmontools/default.nix+4−1
@@ -1,4 +1,5 @@
1−{ stdenv, fetchurl }:
1+{ stdenv, fetchurl
2+, IOKit ? null }:
23
34let
45 version = "6.4";
@@ -18,6 +19,8 @@ stdenv.mkDerivation rec {
1819 sha256 = "11bsxcghh7adzdklcslamlynydxb708vfz892d5w7agdq405ddza";
1920 };
2021
22+ buildInputs = [] ++ stdenv.lib.optional stdenv.isDarwin IOKit;
23+
2124 patchPhase = ''
2225 cp ${driverdb} drivedb.h
2326 sed -i -e 's@which which >/dev/null || exit 1@alias which="type -p"@' update-smart-drivedb.in
pkgs/top-level/all-packages.nix+3−1
@@ -3498,7 +3498,9 @@ in
34983498
34993499 slsnif = callPackage ../tools/misc/slsnif { };
35003500
3501− smartmontools = callPackage ../tools/system/smartmontools { };
3501+ smartmontools = callPackage ../tools/system/smartmontools {
3502+ inherit (darwin.apple_sdk.frameworks) IOKit;
3503+ };
35023504
35033505 smbldaptools = callPackage ../tools/networking/smbldaptools {
35043506 inherit (perlPackages) NetLDAP CryptSmbHash DigestSHA1;