Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 67 lines 1.3 kB view raw
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 [ 36 "-config" 37 "release" 38 ] 39 # Build mixes up dylibs/frameworks if one is not explicitly specified. 40 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 41 "-config" 42 "qt_framework" 43 ]; 44 45 dontWrapQtApps = true; 46 47 preConfigure = '' 48 sed -i -e 's|/bin/pwd|pwd|g' configure 49 ''; 50 51 # The tests fail on darwin because of install_name if they run 52 # before the frameworks are installed. 53 doCheck = false; 54 doInstallCheck = true; 55 installCheckTarget = "check"; 56 57 # Hack to avoid TMPDIR in RPATHs. 58 preFixup = "rm -rf lib"; 59 60 meta = with lib; { 61 description = "Cross-platform IRC framework written with Qt"; 62 homepage = "https://communi.github.io"; 63 license = licenses.bsd3; 64 platforms = platforms.all; 65 maintainers = with maintainers; [ hrdinka ]; 66 }; 67}