summary refs log blame commit diff
path: root/pkgs/applications/networking/nextcloud-client/default.nix
blob: 3a63f98c44c3b682edf635adbf7068cfc5c56976 (plain) (tree)
1
2
3
4
5
6
7
8
9




                 
                   


           
            



             
              

                    
        
          
           
  
 
                  
                             
                    
 



                         
                                                                   

    
             
                                                                                                    
                                                              
                                                                     

    
                       
              
         
            
    
 


                     
             





               

                      
                

          
 

                                                                     

                                                           
                                                      

    

                                                                                             
                                                            
    
 
                    
                                                    
                                       
                                
                                                
                                

    
{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, inotify-tools
, libcloudproviders
, libsecret
, openssl
, pcre
, pkg-config
, qtbase
, qtkeychain
, qttools
, qtwebengine
, qtwebsockets
, qtquickcontrols2
, qtgraphicaleffects
, sqlite
, inkscape
, xdg-utils
}:

mkDerivation rec {
  pname = "nextcloud-client";
  version = "3.4.3";

  src = fetchFromGitHub {
    owner = "nextcloud";
    repo = "desktop";
    rev = "v${version}";
    sha256 = "sha256-nryoueoqnbBAJaU11OUXKP5PNrYf4515ojBkdMFIEMA=";
  };

  patches = [
    # Explicitly move dbus configuration files to the store path rather than `/etc/dbus-1/services`.
    ./0001-Explicitly-copy-dbus-files-into-the-store-dir.patch
    ./0001-When-creating-the-autostart-entry-do-not-use-an-abso.patch
  ];

  nativeBuildInputs = [
    pkg-config
    cmake
    inkscape
  ];

  buildInputs = [
    inotify-tools
    libcloudproviders
    libsecret
    openssl
    pcre
    qtbase
    qtkeychain
    qttools
    qtwebengine
    qtquickcontrols2
    qtgraphicaleffects
    qtwebsockets
    sqlite
  ];

  qtWrapperArgs = [
    "--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libsecret ]}"
    # See also: https://bugreports.qt.io/browse/QTBUG-85967
    "--set QML_DISABLE_DISK_CACHE 1"
    "--prefix PATH : ${lib.makeBinPath [ xdg-utils ]}"
  ];

  cmakeFlags = [
    "-DCMAKE_INSTALL_LIBDIR=lib" # expected to be prefix-relative by build code setting RPATH
    "-DNO_SHIBBOLETH=1" # allows to compile without qtwebkit
  ];

  meta = with lib; {
    description = "Nextcloud themed desktop client";
    homepage = "https://nextcloud.com";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ kranzes ];
    platforms = platforms.linux;
  };
}