{ nixpkgs ? , kasyncSrc ? nixpkgs.fetchgit { url = "https://anongit.kde.org/kasync.git"; rev = "8a68ad7da7f9d7d10d249a16a474fa7ca82517be"; sha256 = "1v55my24d3zhllw77sjzngs6cwddjqf9xw9v0hkwk2gq2znwp6g8"; fetchSubmodules = true; }, kimap2Src ? nixpkgs.fetchgit { url = "https://anongit.kde.org/kimap2.git"; rev = "62df1b858b3fd7c6c4b3229ff5051c0e4996b1be"; sha256 = "1q43dzza1v5kjsvzisw5j2750550596s6hra45xbqny08hkpk355"; fetchSubmodules = true; }, kdav2Src ? nixpkgs.fetchgit { url = "https://anongit.kde.org/kdav2.git"; rev = "830f07b99dc8badf5df40edb81cbac63a3ddb3c4"; sha256 = "1da6ivjjq9bh855jiv0kzxi83z736iazn747gkaj261ai8qn7spz"; fetchSubmodules = true; }, sinkSrc ? nixpkgs.fetchgit { url = "https://github.com/KDE/sink"; rev = "e1a6d6f5bbaeeffd92a2049849b75e248c2d492b"; sha256 = "196vqd7gk93mfizxnfz918rs5g3723ndarx79x84q8qvk7bngc0v"; fetchSubmodules = true; }, kubeSrc, compiler ? "gcc7", cmakeBuildType ? "Debug" }: let pkgs = import nixpkgs {}; stdenv = pkgs.overrideCC pkgs.stdenv pkgs.${compiler}; in rec { kasync = stdenv.mkDerivation { name = "kasync"; nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; buildInputs = with pkgs; with qt5; [ extra-cmake-modules qtbase ]; src = kasyncSrc; inherit cmakeBuildType; }; kimap2 = stdenv.mkDerivation { name = "kimap2"; nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; buildInputs = with pkgs; with qt5; with kdeFrameworks; [ extra-cmake-modules qtbase kcoreaddons kcodecs kdeApplications.kmime cyrus_sasl ]; src = kimap2Src; inherit cmakeBuildType; }; kdav2 = stdenv.mkDerivation { name = "kdav2"; nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; buildInputs = with pkgs; with qt5; with kdeFrameworks; [ extra-cmake-modules qtbase qtxmlpatterns kcoreaddons ]; src = kdav2Src; inherit cmakeBuildType; }; sink = stdenv.mkDerivation { name = "sink"; nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; buildInputs = with pkgs; with qt5; with kdeApplications; [ extra-cmake-modules kmime kcontacts kcalcore flatbuffers lmdb xapian cyrus_sasl curl libgit2 readline qtbase kasync kimap2 kdav2 ]; cmakeFlags = [ "-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always" "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" ]; src = sinkSrc; inherit cmakeBuildType; }; sinkTest = sink.overrideAttrs (oldAttrs: rec { doCheck = true; # Only tests that does not involve external resources checkPhase = '' mkdir -p plugins/sink/resources ln -s examples/*resource/libsink_resource*.so plugins/sink/resources/ export LD_LIBRARY_PATH=$PWD/tests:$PWD/examples/caldavresource/:$PWD/examples/dummyresource/:$PWD/tests/hawd:$PWD/common QT_PLUGIN_PATH=$QT_PLUGIN_PATH:$PWD/plugins/ PATH=$PATH:$PWD/synchronizer/ ./tests/clientapitest && ./tests/resourceconfigtest && ./tests/storagetest && ./tests/domainadaptortest && ./tests/messagequeuetest && ./tests/indextest && ./tests/resourcecommunicationtest && ./tests/pipelinetest && ./tests/querytest && ./tests/modelinteractivitytest && ./tests/inspectiontest && ./tests/accountstest && ./tests/testaccounttest && ./tests/dummyresourcemailtest && ./tests/interresourcemovetest && ./tests/notificationtest && ./tests/entitystoretest && ./tests/upgradetest && ./tests/resourcecontroltest && ./tests/dummyresourcetest ''; }); kube = stdenv.mkDerivation { name = "kube"; nativeBuildInputs = with pkgs; [ cmake ninja ccache ]; buildInputs = with pkgs; with qt5; with kdeFrameworks; with kdeApplications; with libsForQt5; [ extra-cmake-modules kcalcore kcodecs kcontacts kmime qtbase qtquickcontrols2 qtwebengine qgpgme sink kasync ]; CCACHE_COMPRESS = 1; CCACHE_DIR = "/var/cache/ccache"; CCACHE_UMASK = "007"; cmakeFlags = [ #"-DCMAKE_CXX_COMPILER_LAUNCHER=${pkgs.ccache}/bin/ccache" "-DCMAKE_CXX_FLAGS=-fdiagnostics-color=always" "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" ]; dontStrip = if (cmakeBuildType == "Debug") then 1 else 0; src = kubeSrc; inherit cmakeBuildType; }; }