biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / networking / nextcloud-client / default.nix
bloba6d88fc686b0f8ea15fb832a6794d438f6d35e93
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , cmake
5 , extra-cmake-modules
6 , inotify-tools
7 , libcloudproviders
8 , librsvg
9 , libsecret
10 , openssl
11 , pcre
12 , pkg-config
13 , qtbase
14 , qtkeychain
15 , qttools
16 , qtwebengine
17 , qtwebsockets
18 , qtquickcontrols2
19 , qtgraphicaleffects
20 , plasma5Packages
21 , sphinx
22 , sqlite
23 , xdg-utils
24 , wrapQtAppsHook
27 stdenv.mkDerivation rec {
28   pname = "nextcloud-client";
29   version = "3.12.3";
31   outputs = [ "out" "dev" ];
33   src = fetchFromGitHub {
34     owner = "nextcloud";
35     repo = "desktop";
36     rev = "v${version}";
37     hash = "sha256-ScWkEOx2tHoCQbFwBvJQgk2YoYOTPi3PrVsaDNJBEUI=";
38   };
40   patches = [
41     # Explicitly move dbus configuration files to the store path rather than `/etc/dbus-1/services`.
42     ./0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
43     ./0001-When-creating-the-autostart-entry-do-not-use-an-abso.patch
44   ];
46   postPatch = ''
47     for file in src/libsync/vfs/*/CMakeLists.txt; do
48       substituteInPlace $file \
49         --replace "PLUGINDIR" "KDE_INSTALL_PLUGINDIR"
50     done
51   '';
53   nativeBuildInputs = [
54     pkg-config
55     cmake
56     extra-cmake-modules
57     librsvg
58     sphinx
59     wrapQtAppsHook
60   ];
62   buildInputs = [
63     inotify-tools
64     libcloudproviders
65     libsecret
66     openssl
67     pcre
68     plasma5Packages.kio
69     qtbase
70     qtkeychain
71     qttools
72     qtwebengine
73     qtquickcontrols2
74     qtgraphicaleffects
75     qtwebsockets
76     sqlite
77   ];
79   qtWrapperArgs = [
80     "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}"
81     # make xdg-open overrideable at runtime
82     "--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"
83   ];
85   cmakeFlags = [
86     "-DBUILD_UPDATER=off"
87     "-DCMAKE_INSTALL_LIBDIR=lib" # expected to be prefix-relative by build code setting RPATH
88     "-DMIRALL_VERSION_SUFFIX=" # remove git suffix from version
89   ];
91   postBuild = ''
92     make doc-man
93   '';
95   meta = with lib; {
96     description = "Nextcloud themed desktop client";
97     homepage = "https://nextcloud.com";
98     license = licenses.gpl2Plus;
99     maintainers = with maintainers; [ kranzes SuperSandro2000 ];
100     platforms = platforms.linux;
101     mainProgram = "nextcloud";
102   };