mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
68 lines
1.8 KiB
Nix
68 lines
1.8 KiB
Nix
{
|
|
qtModule,
|
|
qtbase,
|
|
qtlanguageserver,
|
|
qtshadertools,
|
|
qtsvg,
|
|
openssl,
|
|
darwin,
|
|
stdenv,
|
|
lib,
|
|
pkgsBuildBuild,
|
|
replaceVars,
|
|
fetchpatch,
|
|
}:
|
|
|
|
qtModule {
|
|
pname = "qtdeclarative";
|
|
|
|
propagatedBuildInputs = [
|
|
qtbase
|
|
qtlanguageserver
|
|
qtshadertools
|
|
qtsvg
|
|
openssl
|
|
];
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.sigtool
|
|
];
|
|
|
|
patches = [
|
|
# don't cache bytecode of bare qml files in the store, as that never gets cleaned up
|
|
(replaceVars ./dont-cache-nix-store-paths.patch {
|
|
nixStore = builtins.storeDir;
|
|
})
|
|
# add version specific QML import path
|
|
./use-versioned-import-path.patch
|
|
|
|
# revert codesigning change on Darwin that doesn't work with our signing tools
|
|
(fetchpatch {
|
|
url = "https://github.com/qt/qtdeclarative/commit/a7084abd9778b955d80e7419e82f6f7b92f7978d.diff";
|
|
hash = "sha256-ESy35OlmsvI4yFQ/rFT8oelOUBCwCmlcbQJvwcTrCig=";
|
|
revert = true;
|
|
})
|
|
|
|
# backport fix recommended by KDE
|
|
(fetchpatch {
|
|
url = "https://github.com/qt/qtdeclarative/commit/8a2c82be6ad90e3f2a0760d8bab1e3a8cdb2473a.diff";
|
|
hash = "sha256-3KbyoQPAiRyCwGnwwYV3y0yz2i6UAJcX70EPsXV0ZZM=";
|
|
})
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DQt6ShaderToolsTools_DIR=${pkgsBuildBuild.qt6.qtshadertools}/lib/cmake/Qt6ShaderTools"
|
|
# for some reason doesn't get found automatically on Darwin
|
|
"-DPython_EXECUTABLE=${lib.getExe pkgsBuildBuild.python3}"
|
|
]
|
|
# Conditional is required to prevent infinite recursion during a cross build
|
|
++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
"-DQt6QmlTools_DIR=${pkgsBuildBuild.qt6.qtdeclarative}/lib/cmake/Qt6QmlTools"
|
|
];
|
|
|
|
meta.maintainers = with lib.maintainers; [
|
|
nickcao
|
|
outfoxxed
|
|
];
|
|
}
|