about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libgpod/default.nix
blob: e56e512931a0a4c99276cc1075fc957fad5a91c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ stdenv, lib, fetchurl, perlPackages, intltool, autoreconfHook,
  pkg-config, glib, libxml2, sqlite, zlib, sg3_utils, gdk-pixbuf, taglib,
  libimobiledevice,
  monoSupport ? false, mono, gtk-sharp-2_0
}:


stdenv.mkDerivation rec {
  pname = "libgpod";
  version = "0.8.3";

  src = fetchurl {
    url = "mirror://sourceforge/gtkpod/libgpod-${version}.tar.bz2";
    sha256 = "0pcmgv1ra0ymv73mlj4qxzgyir026z9jpl5s5bkg35afs1cpk2k3";
  };

  outputs = [ "out" "dev" ];

  postPatch = ''
    # support libplist 2.2
    substituteInPlace configure.ac --replace 'libplist >= 1.0' 'libplist-2.0 >= 2.2'
  '';

  configureFlags = [
    "--without-hal"
    "--enable-udev"
    "--with-udev-dir=${placeholder "out"}/lib/udev"
  ] ++ lib.optionals monoSupport [ "--with-mono" ];

  dontStrip = true;

  propagatedBuildInputs = [ glib libxml2 sqlite zlib sg3_utils
    gdk-pixbuf taglib libimobiledevice ];

  nativeBuildInputs = [ autoreconfHook intltool pkg-config ]
    ++ (with perlPackages; [ perl XMLParser ])
    ++ lib.optionals monoSupport [ mono gtk-sharp-2_0 ];

  meta = {
    homepage = "https://gtkpod.sourceforge.net/";
    description = "Library used by gtkpod to access the contents of an ipod";
    license = "LGPL";
    platforms = lib.platforms.gnu ++ lib.platforms.linux;
    maintainers = [ ];
  };
}