2017-11-20 05:57:36 +00:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
|
2018-02-25 02:23:58 +00:00
|
|
|
, inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome-keyring }:
|
2017-08-28 21:33:51 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nextcloud-client-${version}";
|
2017-12-04 21:08:32 +00:00
|
|
|
version = "2.3.3";
|
2017-08-28 21:33:51 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://github.com/nextcloud/client_theming.git";
|
2017-12-04 21:08:32 +00:00
|
|
|
rev = "ab40efe1e1475efddd636c09251d8917627261da";
|
|
|
|
sha256 = "19a1kqydgx47sa1a917j46zlbc5g9nynsanasyad9c8sqi0qvyip";
|
2017-08-28 21:33:51 +01:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2017-11-20 05:57:36 +00:00
|
|
|
patches = [ ./find-sql.patch ];
|
|
|
|
patchFlags = "-d client -p1";
|
|
|
|
|
2017-08-28 21:33:51 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake ];
|
2017-09-13 00:29:16 +01:00
|
|
|
|
2017-11-20 05:57:36 +00:00
|
|
|
buildInputs = [ qtbase qtwebkit qtkeychain qttools sqlite ]
|
2017-09-13 00:29:16 +01:00
|
|
|
++ stdenv.lib.optional stdenv.isLinux inotify-tools
|
|
|
|
++ stdenv.lib.optional withGnomeKeyring makeWrapper;
|
2017-08-28 21:33:51 +01:00
|
|
|
|
2017-09-12 00:52:48 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-09-12 00:31:41 +01:00
|
|
|
dontUseCmakeBuildDir = true;
|
|
|
|
|
|
|
|
cmakeDir = "client";
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-UCMAKE_INSTALL_LIBDIR"
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
|
|
|
"-DOEM_THEME_DIR=${src}/nextcloudtheme"
|
2017-09-12 00:34:17 +01:00
|
|
|
] ++ stdenv.lib.optionals stdenv.isLinux [
|
|
|
|
"-DINOTIFY_LIBRARY=${inotify-tools}/lib/libinotifytools.so"
|
|
|
|
"-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
|
2017-09-12 00:31:41 +01:00
|
|
|
];
|
2017-08-28 21:33:51 +01:00
|
|
|
|
2018-01-13 09:55:35 +00:00
|
|
|
postInstall = ''
|
|
|
|
sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
|
|
|
|
$out/share/applications/nextcloud.desktop
|
|
|
|
'' + stdenv.lib.optionalString (withGnomeKeyring) ''
|
2017-09-13 00:29:16 +01:00
|
|
|
wrapProgram "$out/bin/nextcloud" \
|
2018-02-25 02:23:58 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libgnome-keyring ]}
|
2017-09-13 00:29:16 +01:00
|
|
|
'';
|
|
|
|
|
2017-08-28 21:33:51 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Nextcloud themed desktop client";
|
|
|
|
homepage = https://nextcloud.com;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ caugner ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|