2017-11-19 21:57:36 -08:00
|
|
|
{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
|
2019-01-16 13:05:42 -08:00
|
|
|
, inotify-tools, makeWrapper, openssl_1_1, pcre, qtwebengine, libsecret, fetchpatch
|
2018-11-22 23:31:31 -08:00
|
|
|
}:
|
2017-08-28 13:33:51 -07:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "nextcloud-client-${version}";
|
2018-12-16 03:44:39 -08:00
|
|
|
version = "2.5.1";
|
2017-08-28 13:33:51 -07:00
|
|
|
|
|
|
|
src = fetchgit {
|
2018-11-22 23:31:31 -08:00
|
|
|
url = "git://github.com/nextcloud/desktop.git";
|
|
|
|
rev = "refs/tags/v${version}";
|
2018-12-16 03:44:39 -08:00
|
|
|
sha256 = "0r6jj3vbmwh7ipv83c8w1b25pbfq3mzrjgcijdw2gwfxwx9pfq7d";
|
2017-08-28 13:33:51 -07:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2019-02-12 15:56:15 -08:00
|
|
|
# Patches contained in next (>2.5.1) release
|
2019-01-16 13:05:42 -08:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-qt-5.12-build";
|
|
|
|
url = "https://github.com/nextcloud/desktop/commit/071709ab5e3366e867dd0b0ea931aa7d6f80f528.patch";
|
|
|
|
sha256 = "14k635jwm8hz6i22lz88jj2db8v5czwa3zg0667i4hwhkqqmy61n";
|
|
|
|
})
|
2019-02-12 15:56:15 -08:00
|
|
|
(fetchpatch {
|
|
|
|
name = "fix-qtwebengine-crash";
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/nextcloud/desktop/pull/959.patch";
|
|
|
|
sha256 = "00qx976az2rb1gwl1rxapm8gqj42yzqp8k2fasn3h7b30lnxdyr0";
|
|
|
|
})
|
2019-01-16 13:05:42 -08:00
|
|
|
];
|
|
|
|
|
2018-11-25 12:26:25 -08:00
|
|
|
nativeBuildInputs = [ pkgconfig cmake makeWrapper ];
|
2017-09-12 16:29:16 -07:00
|
|
|
|
2018-11-22 23:31:31 -08:00
|
|
|
buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl_1_1.out pcre inotify-tools ];
|
2017-08-28 13:33:51 -07:00
|
|
|
|
2017-09-11 16:52:48 -07:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2018-11-22 23:31:31 -08:00
|
|
|
NIX_LDFLAGS = "${openssl_1_1.out}/lib/libssl.so ${openssl_1_1.out}/lib/libcrypto.so";
|
2017-09-11 16:31:41 -07:00
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-UCMAKE_INSTALL_LIBDIR"
|
|
|
|
"-DCMAKE_BUILD_TYPE=Release"
|
2018-11-22 23:31:31 -08:00
|
|
|
"-DOPENSSL_LIBRARIES=${openssl_1_1.out}/lib"
|
|
|
|
"-DOPENSSL_INCLUDE_DIR=${openssl_1_1.dev}/include"
|
2017-09-11 16:34:17 -07:00
|
|
|
"-DINOTIFY_LIBRARY=${inotify-tools}/lib/libinotifytools.so"
|
|
|
|
"-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
|
2017-09-11 16:31:41 -07:00
|
|
|
];
|
2017-08-28 13:33:51 -07:00
|
|
|
|
2018-01-13 01:55:35 -08:00
|
|
|
postInstall = ''
|
|
|
|
sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
|
2018-11-25 12:26:25 -08:00
|
|
|
$out/share/applications/nextcloud.desktop
|
|
|
|
|
|
|
|
wrapProgram "$out/bin/nextcloud" \
|
2019-01-22 13:31:52 -08:00
|
|
|
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]} \
|
|
|
|
--prefix QT_PLUGIN_PATH : ${qtbase}/${qtbase.qtPluginPrefix}
|
2017-09-12 16:29:16 -07:00
|
|
|
'';
|
|
|
|
|
2017-08-28 13:33:51 -07:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Nextcloud themed desktop client";
|
|
|
|
homepage = https://nextcloud.com;
|
|
|
|
license = licenses.gpl2;
|
2018-11-22 23:31:31 -08:00
|
|
|
maintainers = with maintainers; [ caugner ma27 ];
|
2018-03-10 22:01:25 -08:00
|
|
|
platforms = platforms.linux;
|
2017-08-28 13:33:51 -07:00
|
|
|
};
|
|
|
|
}
|