From 7319dc20c941969e052f1eddd94a43e1210389cb Mon Sep 17 00:00:00 2001 From: Marc Seeger Date: Wed, 2 Dec 2020 12:16:59 -0800 Subject: [PATCH] idevicerestore: Add darwin support. --- pkgs/tools/misc/idevicerestore/default.nix | 7 ++++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/idevicerestore/default.nix b/pkgs/tools/misc/idevicerestore/default.nix index 5a606411441..ab22e413b00 100644 --- a/pkgs/tools/misc/idevicerestore/default.nix +++ b/pkgs/tools/misc/idevicerestore/default.nix @@ -4,6 +4,7 @@ , libirecovery , libzip , libusbmuxd +, IOKit }: stdenv.mkDerivation rec { @@ -31,7 +32,7 @@ stdenv.mkDerivation rec { # Not listing other dependencies specified in # https://github.com/libimobiledevice/idevicerestore/blob/8a882038b2b1e022fbd19eaf8bea51006a373c06/README#L20 # because they are inherited `libimobiledevice`. - ]; + ] ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit ]; meta = with stdenv.lib; { homepage = "https://github.com/libimobiledevice/idevicerestore"; @@ -51,8 +52,8 @@ stdenv.mkDerivation rec { This will download and restore a device to the latest firmware available. ''; license = licenses.lgpl21Plus; - # configure.ac suggests it should work for darwin and mingw as well but not tried yet - platforms = platforms.linux; + # configure.ac suggests it should work for mingw as well but not tried yet + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ nh2 ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4420d2f0bc9..f307ffbedbb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4750,7 +4750,9 @@ in ifuse = callPackage ../tools/filesystems/ifuse { }; ideviceinstaller = callPackage ../tools/misc/ideviceinstaller { }; - idevicerestore = callPackage ../tools/misc/idevicerestore { }; + idevicerestore = callPackage ../tools/misc/idevicerestore { + inherit (darwin) IOKit; + }; inherit (callPackages ../tools/filesystems/irods rec { stdenv = llvmPackages.libcxxStdenv;