2017-11-20 05:57:36 +00:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
|
2019-01-16 21:05:42 +00:00
|
|
|
, inotify-tools, makeWrapper, openssl_1_1, pcre, qtwebengine, libsecret, fetchpatch
|
2019-04-06 09:53:39 +00:00
|
|
|
, libcloudproviders
|
2018-11-23 07:31:31 +00:00
|
|
|
}:
|
2017-08-28 20:33:51 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nextcloud-client-${version}";
|
2019-04-06 09:53:39 +00:00
|
|
|
version = "2.5.2";
|
2017-08-28 20:33:51 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
2018-11-23 07:31:31 +00:00
|
|
|
url = "git://github.com/nextcloud/desktop.git";
|
|
|
|
rev = "refs/tags/v${version}";
|
2019-04-06 09:53:39 +00:00
|
|
|
sha256 = "1brpxdgyy742dqw6cyyv2257d6ihwiqhbzfk2hb8zjgbi6p9lhsr";
|
2017-08-28 20:33:51 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2018-11-25 20:26:25 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake makeWrapper ];
|
2017-09-12 23:29:16 +00:00
|
|
|
|
2019-04-06 09:53:39 +00:00
|
|
|
buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl_1_1.out pcre inotify-tools libcloudproviders ];
|
2017-08-28 20:33:51 +00:00
|
|
|
|
2017-09-11 23:52:48 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-11-23 07:31:31 +00:00
|
|
|
NIX_LDFLAGS = "${openssl_1_1.out}/lib/libssl.so ${openssl_1_1.out}/lib/libcrypto.so";
|
2017-09-11 23:31:41 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-UCMAKE_INSTALL_LIBDIR"
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
2018-11-23 07:31:31 +00:00
|
|
|
"-DOPENSSL_LIBRARIES=${openssl_1_1.out}/lib"
|
|
|
|
"-DOPENSSL_INCLUDE_DIR=${openssl_1_1.dev}/include"
|
2017-09-11 23:34:17 +00:00
|
|
|
"-DINOTIFY_LIBRARY=${inotify-tools}/lib/libinotifytools.so"
|
|
|
|
"-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
|
2017-09-11 23:31:41 +00:00
|
|
|
];
|
2017-08-28 20:33:51 +00:00
|
|
|
|
2018-01-13 09:55:35 +00:00
|
|
|
postInstall = ''
|
|
|
|
sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
|
2018-11-25 20:26:25 +00:00
|
|
|
$out/share/applications/nextcloud.desktop
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/nextcloud" \
|
2019-01-22 21:31:52 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]} \
|
|
|
|
--prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix}
|
2017-09-12 23:29:16 +00:00
|
|
|
'';
|
|
|
|
|
2017-08-28 20:33:51 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Nextcloud themed desktop client";
|
|
|
|
homepage = https://nextcloud.com;
|
|
|
|
license = licenses.gpl2;
|
2018-11-23 07:31:31 +00:00
|
|
|
maintainers = with maintainers; [ caugner ma27 ];
|
2018-03-11 06:01:25 +00:00
|
|
|
platforms = platforms.linux;
|
2017-08-28 20:33:51 +00:00
|
|
|
};
|
|
|
|
}
|