nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 autoreconfHook,
7 pkg-config,
8 openssl,
9 libgcrypt,
10 libplist,
11 libtasn1,
12 libusbmuxd,
13 libimobiledevice-glue,
14 unstableGitUpdater,
15}:
16
17stdenv.mkDerivation rec {
18 pname = "libimobiledevice";
19 version = "1.3.0-unstable-2024-05-20";
20
21 src = fetchFromGitHub {
22 owner = "libimobiledevice";
23 repo = "libimobiledevice";
24 rev = "9ccc52222c287b35e41625cc282fb882544676c6";
25 hash = "sha256-pNvtDGUlifp10V59Kah4q87TvLrcptrCJURHo+Y+hs4=";
26 };
27
28 patches = [
29 # Fix gcc-14 and clang-16 build:
30 # https://github.com/libimobiledevice/libimobiledevice/pull/1569
31 (fetchpatch {
32 name = "fime.h.patch";
33 url = "https://github.com/libimobiledevice/libimobiledevice/commit/92256c2ae2422dac45d8648a63517598bdd89883.patch";
34 hash = "sha256-sB+wEFuXFoQnuf7ntWfvYuCgWfYbmlPL7EjW0L0F74o=";
35 })
36 ];
37
38 preAutoreconf = ''
39 export RELEASE_VERSION=${version}
40 '';
41
42 configureFlags = [ "--without-cython" ];
43
44 nativeBuildInputs = [
45 autoreconfHook
46 pkg-config
47 ];
48
49 propagatedBuildInputs = [
50 openssl
51 libgcrypt
52 libplist
53 libtasn1
54 libusbmuxd
55 libimobiledevice-glue
56 ];
57
58 outputs = [
59 "out"
60 "dev"
61 ];
62
63 enableParallelBuilding = true;
64
65 passthru.updateScript = unstableGitUpdater { };
66
67 meta = with lib; {
68 homepage = "https://github.com/libimobiledevice/libimobiledevice";
69 description = "Software library that talks the protocols to support iPhone®, iPod Touch® and iPad® devices on Linux";
70 longDescription = ''
71 libimobiledevice is a software library that talks the protocols to support
72 iPhone®, iPod Touch® and iPad® devices on Linux. Unlike other projects, it
73 does not depend on using any existing proprietary libraries and does not
74 require jailbreaking. It allows other software to easily access the
75 device's filesystem, retrieve information about the device and it's
76 internals, backup/restore the device, manage SpringBoard® icons, manage
77 installed applications, retrieve addressbook/calendars/notes and bookmarks
78 and synchronize music and video to the device. The library is in
79 development since August 2007 with the goal to bring support for these
80 devices to the Linux Desktop.
81 '';
82 license = licenses.lgpl21Plus;
83 platforms = platforms.unix;
84 maintainers = with maintainers; [ RossComputerGuy ];
85 };
86}