summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSamuel Leathers <disasm@gmail.com>2019-08-23 23:22:06 -0400
committerGitHub <noreply@github.com>2019-08-23 23:22:06 -0400
commit5f202e0b2265d67623ecd45df8eeda2ff4db5d8e (patch)
tree1745ca5cead0bc847eb83df4ad5afbdaad53410c /pkgs
parentaff3036a6f92100bbcea0004316ade4dfae06cf4 (diff)
parent80fbcf2d33285bbd667e3be8888bfd4e161a045b (diff)
downloadnixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.tar
nixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.tar.gz
nixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.tar.bz2
nixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.tar.lz
nixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.tar.xz
nixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.tar.zst
nixpkgs-5f202e0b2265d67623ecd45df8eeda2ff4db5d8e.zip
Merge pull request #67367 from jtojnar/nextcloud-cleanup
nextcloud-client: clean up
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch2
-rw-r--r--pkgs/applications/networking/nextcloud-client/default.nix67
2 files changed, 41 insertions, 28 deletions
diff --git a/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch b/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
index 67cabc820b7..ab7cb9bffa4 100644
--- a/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
+++ b/pkgs/applications/networking/nextcloud-client/0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
@@ -16,7 +16,7 @@ index 1f35335..7f76951 100644
  
  macro(dbus_add_activation_service _sources)
 -    PKGCONFIG_GETVAR(dbus-1 session_bus_services_dir _install_dir)
-+    set(_install_dir "${CMAKE_INSTALL_PREFIX}/etc/dbus-1/service")
++    set(_install_dir "${CMAKE_INSTALL_DATADIR}/dbus-1/service")
      foreach (_i ${_sources})
          get_filename_component(_service_file ${_i} ABSOLUTE)
          string(REGEX REPLACE "\\.service.*$" ".service" _output_file ${_i})
diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix
index 19db1e140c9..6f7f47bdcfa 100644
--- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -1,48 +1,61 @@
-{ lib, mkDerivation, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
-, inotify-tools, openssl, pcre, qtwebengine, libsecret
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, cmake
+, inotify-tools
 , libcloudproviders
+, libsecret
+, openssl
+, pcre
+, pkgconfig
+, qtbase
+, qtkeychain
+, qttools
+, qtwebengine
+, qtwebkit
+, sqlite
 }:
 
 mkDerivation rec {
-  name = "nextcloud-client-${version}";
+  pname = "nextcloud-client";
   version = "2.5.3";
 
-  src = fetchgit {
-    url = "git://github.com/nextcloud/desktop.git";
-    rev = "refs/tags/v${version}";
-    sha256 = "0fbw56bfbyk3cqv94iqfsxjf01dwy1ysjz89dri7qccs65rnjswj";
-    fetchSubmodules = true;
+  src = fetchFromGitHub {
+    owner = "nextcloud";
+    repo = "desktop";
+    rev = "v${version}";
+    sha256 = "1pzlq507fasf2ljf37gkw00qrig4w2r712rsy05zfwlncgcn7fnw";
   };
 
   patches = [
     ./0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
   ];
 
-  nativeBuildInputs = [ pkgconfig cmake ];
-
-  buildInputs = [ qtbase qtwebkit qtkeychain qttools qtwebengine sqlite openssl.out pcre inotify-tools libcloudproviders ];
-
-  enableParallelBuilding = true;
-
-  NIX_LDFLAGS = "${openssl.out}/lib/libssl.so ${openssl.out}/lib/libcrypto.so";
+  nativeBuildInputs = [
+    pkgconfig
+    cmake
+  ];
 
-  cmakeFlags = [
-    "-UCMAKE_INSTALL_LIBDIR"
-    "-DCMAKE_BUILD_TYPE=Release"
-    "-DOPENSSL_LIBRARIES=${openssl.out}/lib"
-    "-DOPENSSL_INCLUDE_DIR=${openssl.dev}/include"
-    "-DINOTIFY_LIBRARY=${inotify-tools}/lib/libinotifytools.so"
-    "-DINOTIFY_INCLUDE_DIR=${inotify-tools}/include"
+  buildInputs = [
+    inotify-tools
+    libcloudproviders
+    openssl
+    pcre
+    qtbase
+    qtkeychain
+    qttools
+    qtwebengine
+    qtwebkit
+    sqlite
   ];
 
   qtWrapperArgs = [
-    ''--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}''
+    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}"
   ];
 
-  postInstall = ''
-    sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
-    $out/share/applications/nextcloud.desktop
-  '';
+  cmakeFlags = [
+    "-DCMAKE_INSTALL_LIBDIR=lib" # expected to be prefix-relative by build code setting RPATH
+  ];
 
   meta = with lib; {
     description = "Nextcloud themed desktop client";