summary refs log tree commit diff
path: root/pkgs/tools/filesystems/grive/default.nix
blob: 9f4472c27f19d9455db60ded56f595c82b68f715 (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
{ stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, libiberty }:

stdenv.mkDerivation rec {
  version = "0.3.0";
  name = "grive-${version}";

  src = fetchgit {
    url = "https://github.com/Grive/grive.git";
    rev = "51e42914f3666ee6e0bc16a4c78f60b117265c24";
    sha256 = "11cqfcjl128nfg1rjvpvr9x1x2ch3kyliw4vi14n51zqp82f9ysb";
  };

  buildInputs = [cmake libgcrypt json_c curl expat stdenv libiberty boost];

  # work around new libiberty headers, see
  # http://stackoverflow.com/questions/11748035/libiberty-bfd-h-wants-config-h-now
  prePatch = ''
    sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \
      libgrive/src/bfd/SymbolInfo.cc
  '';

  meta = {
    description = "An open source (experimental) Linux client for Google Drive";
    homepage = https://github.com/Grive/grive;
    license = stdenv.lib.licenses.gpl2;

    platforms = stdenv.lib.platforms.linux;
  };
}