nextcloud-client: clean up

Continuation of https://github.com/NixOS/nixpkgs/pull/67306

* Switched to non-deprecated dbus config path.
* Removed CMake flags for finding dependencies, the project can find them on its own.
* Properly fixed the RPATH issue from https://github.com/NixOS/nixpkgs/pull/15406 – ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}.
* Dropped changing Icon name in the desktop file as it was fixed upstream.
* Switched to fetchFromGitHub, as the submodules are only for Win, Mac & crash reporting.
* Dropped enableParallelBuilding = true, as it is on by default with CMake.

+12 -26
+1 -1
pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
··· 16 16 17 17 macro(dbus_add_activation_service _sources) 18 18 - PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir) 19 - + set(_install_dir "${CMAKE_INSTALL_PREFIX}/etc/dbus-1/service") 19 + + set(_install_dir "${CMAKE_INSTALL_DATADIR}/dbus-1/service") 20 20 foreach (_i ${_sources}) 21 21 get_filename_component(_service_file ${_i} ABSOLUTE) 22 22 string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})
+11 -25
pkgs/applications/networking/nextcloud-client/default.nix
··· 1 - { lib, mkDerivation, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite 1 + { lib, mkDerivation, fetchFromGitHub, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite 2 2 , inotify-tools, openssl, pcre, qtwebengine, libsecret 3 3 , libcloudproviders 4 4 }: 5 5 6 6 mkDerivation rec { 7 - name = "nextcloud-client-${version}"; 7 + pname = "nextcloud-client"; 8 8 version = "2.5.3"; 9 9 10 - src = fetchgit { 11 - url = "git://github.com/nextcloud/desktop.git"; 12 - rev = "refs/tags/v${version}"; 13 - sha256 = "0fbw56bfbyk3cqv94iqfsxjf01dwy1ysjz89dri7qccs65rnjswj"; 14 - fetchSubmodules = true; 10 + src = fetchFromGitHub { 11 + owner = "nextcloud"; 12 + repo = "desktop"; 13 + rev = "v${version}"; 14 + sha256 = "1pzlq507fasf2ljf37gkw00qrig4w2r712rsy05zfwlncgcn7fnw"; 15 15 }; 16 16 17 17 patches = [ ··· 20 20 21 21 nativeBuildInputs = [ pkgconfig cmake ]; 22 22 23 - buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl.out pcre inotify-tools libcloudproviders ]; 24 - 25 - enableParallelBuilding = true; 26 - 27 - NIX_LDFLAGS = "${openssl.out}/lib/libssl.so ${openssl.out}/lib/libcrypto.so"; 28 - 29 - cmakeFlags = [ 30 - "-UCMAKE_INSTALL_LIBDIR" 31 - "-DCMAKE_BUILD_TYPE=Release" 32 - "-DOPENSSL_LIBRARIES=${openssl.out}/lib" 33 - "-DOPENSSL_INCLUDE_DIR=${openssl.dev}/include" 34 - "-DINOTIFY_LIBRARY=${inotify-tools}/lib/libinotifytools.so" 35 - "-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include" 36 - ]; 23 + buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl pcre inotify-tools libcloudproviders ]; 37 24 38 25 qtWrapperArgs = [ 39 26 ''--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}'' 40 27 ]; 41 28 42 - postInstall = '' 43 - sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \ 44 - $out/share/applications/nextcloud.desktop 45 - ''; 29 + cmakeFlags = [ 30 + "-DCMAKE_INSTALL_LIBDIR=lib" # expected to be prefix-relative by build code setting RPATH 31 + ]; 46 32 47 33 meta = with lib; { 48 34 description = "Nextcloud themed desktop client";