at master 923 B view raw
1{ 2 stdenv, 3 lib, 4 lazarus, 5 qmake, 6 qtbase, 7 # Not in Qt6 anymore 8 qtx11extras ? null, 9}: 10 11let 12 qtVersion = lib.versions.major qtbase.version; 13in 14stdenv.mkDerivation { 15 pname = "libqtpas"; 16 inherit (lazarus) version src; 17 18 sourceRoot = "lazarus/lcl/interfaces/qt${qtVersion}/cbindings"; 19 20 postPatch = '' 21 substituteInPlace Qt${qtVersion}Pas.pro \ 22 --replace 'target.path = $$[QT_INSTALL_LIBS]' "target.path = $out/lib" 23 ''; 24 25 nativeBuildInputs = [ qmake ]; 26 27 buildInputs = [ 28 qtbase 29 ] 30 ++ lib.optionals (qtVersion == "5") [ 31 qtx11extras 32 ]; 33 34 dontWrapQtApps = true; 35 36 meta = with lib; { 37 description = "Free Pascal Qt${qtVersion} binding library"; 38 homepage = 39 "https://wiki.freepascal.org/Qt${qtVersion}_Interface" 40 + lib.optionalString (qtVersion == "5") "#libqt5pas"; 41 maintainers = with maintainers; [ sikmir ]; 42 inherit (lazarus.meta) license platforms; 43 }; 44}