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