1{ stdenv
2, lib
3, fetchurl
4, perlPackages
5, intltool
6, autoreconfHook
7, pkg-config
8, glib
9, libxml2
10, sqlite
11, zlib
12, sg3_utils
13, gdk-pixbuf
14, taglib
15, libimobiledevice
16, monoSupport ? false
17, mono
18, gtk-sharp-2_0
19}:
20
21stdenv.mkDerivation rec {
22 pname = "libgpod";
23 version = "0.8.3";
24
25 src = fetchurl {
26 url = "mirror://sourceforge/gtkpod/libgpod-${version}.tar.bz2";
27 sha256 = "0pcmgv1ra0ymv73mlj4qxzgyir026z9jpl5s5bkg35afs1cpk2k3";
28 };
29
30 outputs = [ "out" "dev" ];
31
32 postPatch = ''
33 # support libplist 2.2
34 substituteInPlace configure.ac --replace 'libplist >= 1.0' 'libplist-2.0 >= 2.2'
35 '';
36
37 configureFlags = [
38 "--without-hal"
39 "--enable-udev"
40 "--with-udev-dir=${placeholder "out"}/lib/udev"
41 ] ++ lib.optionals monoSupport [ "--with-mono" ];
42
43 dontStrip = monoSupport;
44
45 nativeBuildInputs = [ autoreconfHook intltool pkg-config ]
46 ++ (with perlPackages; [ perl XMLParser ])
47 ++ lib.optional monoSupport mono;
48
49 buildInputs = [
50 libxml2
51 sg3_utils
52 sqlite
53 taglib
54 ] ++ lib.optional monoSupport gtk-sharp-2_0;
55
56 propagatedBuildInputs = [
57 gdk-pixbuf
58 glib
59 libimobiledevice
60 ];
61
62 meta = with lib; {
63 homepage = "https://sourceforge.net/projects/gtkpod/";
64 description = "Library used by gtkpod to access the contents of an ipod";
65 license = licenses.lgpl21Plus;
66 platforms = platforms.linux;
67 maintainers = [ ];
68 };
69}