Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 qtbase, 6 qtdeclarative, 7 qmake, 8 which, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "libcommuni"; 13 version = "3.7.0"; 14 15 src = fetchFromGitHub { 16 owner = "communi"; 17 repo = "libcommuni"; 18 rev = "v${version}"; 19 sha256 = "sha256-9eYJpmjW1J48RD6wVJOHmsAgTbauNeeCrXe076ufq1I="; 20 }; 21 22 buildInputs = [ 23 qtbase 24 qtdeclarative 25 ]; 26 nativeBuildInputs = [ 27 qmake 28 which 29 ]; 30 31 enableParallelBuilding = true; 32 33 dontUseQmakeConfigure = true; 34 configureFlags = [ 35 "-config" 36 "release" 37 ] 38 # Build mixes up dylibs/frameworks if one is not explicitly specified. 39 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 40 "-config" 41 "qt_framework" 42 ]; 43 44 dontWrapQtApps = true; 45 46 preConfigure = '' 47 sed -i -e 's|/bin/pwd|pwd|g' configure 48 ''; 49 50 # The tests fail on darwin because of install_name if they run 51 # before the frameworks are installed. 52 doCheck = false; 53 doInstallCheck = true; 54 installCheckTarget = "check"; 55 56 # Hack to avoid TMPDIR in RPATHs. 57 preFixup = "rm -rf lib"; 58 59 meta = with lib; { 60 description = "Cross-platform IRC framework written with Qt"; 61 homepage = "https://communi.github.io"; 62 license = licenses.bsd3; 63 platforms = platforms.all; 64 maintainers = with maintainers; [ hrdinka ]; 65 }; 66}