git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #59427 from nh2/idevicerestore

Add libirecovery and idevicerestore

commitf4af5f389925364f05e78445441dd17ef1ba567a authorworldofpeace <worldofpeace@protonmail.ch> dateMon 12 Aug 2019, 20:21 (7 years ago) parent47fa2f10f206b3
4 files changed+115−1
pkgs/development/libraries/libimobiledevice/default.nix−1 pkgs/development/libraries/libirecovery/default.nix+54 pkgs/tools/misc/idevicerestore/default.nix+58 pkgs/top-level/all-packages.nix+3
pkgs/development/libraries/libimobiledevice/default.nix−1
@@ -34,7 +34,6 @@ stdenv.mkDerivation rec {
3434 preConfigure = "NOCONFIGURE=1 ./autogen.sh";
3535
3636 configureFlags = [
37− "--disable-static"
3837 "--disable-openssl"
3938 "--without-cython"
4039 ];
pkgs/development/libraries/libirecovery/default.nixnew file+54
@@ -0,0 +1,54 @@
1+{ stdenv, fetchFromGitHub, automake, autoconf, libtool, pkgconfig
2+, libusb
3+, readline
4+}:
5+
6+stdenv.mkDerivation rec {
7+ pname = "libirecovery";
8+ version = "2019-01-28";
9+
10+ src = fetchFromGitHub {
11+ owner = "libimobiledevice";
12+ repo = pname;
13+ rev = "5da2a0d7d60f79d93c283964888c6fbbc17be1a3";
14+ sha256 = "0fqmr1h4b3qn608dn606y7aqv3bsm949gx72b5d6433xlw9b23n8";
15+ };
16+
17+ outputs = [ "out" "dev" ];
18+
19+ nativeBuildInputs = [
20+ autoconf
21+ automake
22+ libtool
23+ pkgconfig
24+ ];
25+
26+ buildInputs = [
27+ libusb
28+ readline
29+ ];
30+
31+ preConfigure = "NOCONFIGURE=1 ./autogen.sh";
32+
33+ # Packager note: Not clear whether this needs a NixOS configuration,
34+ # as only the `idevicerestore` binary was tested so far (which worked
35+ # without further configuration).
36+ configureFlags = [
37+ "--with-udevrulesdir=${placeholder ''out''}/lib/udev/rules.d"
38+ ''--with-udevrule="OWNER=\"root\", GROUP=\"myusergroup\", MODE=\"0660\""''
39+ ];
40+
41+ meta = with stdenv.lib; {
42+ homepage = https://github.com/libimobiledevice/libirecovery;
43+ description = "Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux";
44+ longDescription = ''
45+ libirecovery is a cross-platform library which implements communication to
46+ iBoot/iBSS found on Apple's iOS devices via USB. A command-line utility is also
47+ provided.
48+ '';
49+ license = licenses.lgpl21;
50+ # Upstream description says it works on more platforms, but packager hasn't tried that yet
51+ platforms = platforms.linux;
52+ maintainers = with maintainers; [ nh2 ];
53+ };
54+}
pkgs/tools/misc/idevicerestore/default.nixnew file+58
@@ -0,0 +1,58 @@
1+{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig
2+, curl
3+, libimobiledevice
4+, libirecovery
5+, libzip
6+, libusbmuxd
7+}:
8+
9+stdenv.mkDerivation rec {
10+ pname = "idevicerestore";
11+ version = "2019-02-14";
12+
13+ src = fetchFromGitHub {
14+ owner = "libimobiledevice";
15+ repo = pname;
16+ rev = "8a882038b2b1e022fbd19eaf8bea51006a373c06";
17+ sha256 = "17lisl7ll43ixl1zqwchn7jljrdyl2p9q99w30i6qaci71mas37m";
18+ };
19+
20+ nativeBuildInputs = [
21+ autoreconfHook
22+ pkgconfig
23+ ];
24+
25+ buildInputs = [
26+ curl
27+ libimobiledevice
28+ libirecovery
29+ libzip
30+ libusbmuxd
31+ # Not listing other dependencies specified in
32+ # https://github.com/libimobiledevice/idevicerestore/blob/8a882038b2b1e022fbd19eaf8bea51006a373c06/README#L20
33+ # because they are inherited `libimobiledevice`.
34+ ];
35+
36+ meta = with stdenv.lib; {
37+ homepage = https://github.com/libimobiledevice/idevicerestore;
38+ description = "Restore/upgrade firmware of iOS devices";
39+ longDescription = ''
40+ The idevicerestore tool allows to restore firmware files to iOS devices.
41+
42+ It is a full reimplementation of all granular steps which are performed during
43+ restore of a firmware to a device.
44+
45+ In general, upgrades and downgrades are possible, however subject to
46+ availability of SHSH blobs from Apple for signing the firmare files.
47+
48+ To restore a device to some firmware, simply run the following:
49+ $ sudo idevicerestore -l
50+
51+ This will download and restore a device to the latest firmware available.
52+ '';
53+ license = licenses.lgpl21Plus;
54+ # configure.ac suggests it should work for darwin and mingw as well but not tried yet
55+ platforms = platforms.linux;
56+ maintainers = with maintainers; [ nh2 ];
57+ };
58+}
pkgs/top-level/all-packages.nix+3
@@ -3839,6 +3839,7 @@ in
38393839
38403840 ifuse = callPackage ../tools/filesystems/ifuse { };
38413841 ideviceinstaller = callPackage ../tools/misc/ideviceinstaller { };
3842+ idevicerestore = callPackage ../tools/misc/idevicerestore { };
38423843
38433844 inherit (callPackages ../tools/filesystems/irods rec {
38443845 stdenv = llvmPackages_38.libcxxStdenv;
@@ -11833,6 +11834,8 @@ in
1183311834 inherit (darwin.apple_sdk.frameworks) Carbon;
1183411835 };
1183511836
11837+ libirecovery = callPackage ../development/libraries/libirecovery { };
11838+
1183611839 libivykis = callPackage ../development/libraries/libivykis { };
1183711840
1183811841 liblastfmSF = callPackage ../development/libraries/liblastfmSF { };