Files
nixpkgs/pkgs/development/compilers/fpc/libqtpas.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

45 lines
917 B
Nix

{
stdenv,
lib,
lazarus,
qmake,
qtbase,
# Not in Qt6 anymore
qtx11extras ? null,
}:
let
qtVersion = lib.versions.major qtbase.version;
in
stdenv.mkDerivation {
pname = "libqtpas";
inherit (lazarus) version src;
sourceRoot = "lazarus/lcl/interfaces/qt${qtVersion}/cbindings";
postPatch = ''
substituteInPlace Qt${qtVersion}Pas.pro \
--replace 'target.path = $$[QT_INSTALL_LIBS]' "target.path = $out/lib"
'';
nativeBuildInputs = [ qmake ];
buildInputs = [
qtbase
]
++ lib.optionals (qtVersion == "5") [
qtx11extras
];
dontWrapQtApps = true;
meta = {
description = "Free Pascal Qt${qtVersion} binding library";
homepage =
"https://wiki.freepascal.org/Qt${qtVersion}_Interface"
+ lib.optionalString (qtVersion == "5") "#libqt5pas";
maintainers = with lib.maintainers; [ sikmir ];
inherit (lazarus.meta) license platforms;
};
}