Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 51 lines 1.1 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 libsForQt5, 8 spdlog, 9 systemd, 10 withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "dtklog"; 15 version = "0.0.1"; 16 17 src = fetchFromGitHub { 18 owner = "linuxdeepin"; 19 repo = "dtklog"; 20 rev = finalAttrs.version; 21 hash = "sha256-8c3KL6pjAFPC4jRpOpPEbEDRBMWnDptwBSbEtcQcf5E="; 22 }; 23 24 nativeBuildInputs = [ 25 cmake 26 pkg-config 27 libsForQt5.wrapQtAppsHook 28 ]; 29 30 dontWrapQtApps = true; 31 32 buildInputs = [ 33 libsForQt5.qtbase 34 spdlog 35 ] 36 ++ lib.optional withSystemd systemd; 37 38 cmakeFlags = [ 39 (lib.cmakeBool "BUILD_WITH_SYSTEMD" withSystemd) 40 (lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib") 41 (lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include") 42 ]; 43 44 meta = { 45 description = "Simple, convinient and thread safe logger for Qt-based C++ apps"; 46 homepage = "https://github.com/linuxdeepin/dtklog"; 47 license = lib.licenses.lgpl21Plus; 48 platforms = lib.platforms.linux; 49 teams = [ lib.teams.deepin ]; 50 }; 51})