mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 11:50:06 +00:00
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
lib,
|
|
stdenv,
|
|
cmake,
|
|
qt6,
|
|
...
|
|
}:
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "ela-widget-tools";
|
|
version = "0-unstable-2025-10-30";
|
|
src = fetchFromGitHub {
|
|
owner = "Liniyous";
|
|
repo = "ElaWidgetTools";
|
|
rev = "c1eed7c23545e61cc63a34f2cc26737c9d563f78";
|
|
hash = "sha256-bmByAQKasqJIaX9W8M+cFQppr7ACF07TZAuXb0xgvfU=";
|
|
};
|
|
|
|
patches = [ ./fix-install-path.patch ];
|
|
|
|
# Qt CMake private include path is empty, generate one ourselves
|
|
postPatch =
|
|
let
|
|
includeBaseFor = component: [
|
|
"${qt6.qtbase}/include/${component}/${qt6.qtbase.version}"
|
|
"${qt6.qtbase}/include/${component}/${qt6.qtbase.version}/${component}"
|
|
];
|
|
includePaths = builtins.concatStringsSep " " (
|
|
lib.flatten (
|
|
builtins.map includeBaseFor [
|
|
"QtCore"
|
|
"QtGui"
|
|
"QtWidgets"
|
|
]
|
|
)
|
|
);
|
|
in
|
|
''
|
|
substituteInPlace ElaWidgetTools/CMakeLists.txt \
|
|
--replace-fail \
|
|
'${"\${Qt\${QT_VERSION_MAJOR}Widgets_PRIVATE_INCLUDE_DIRS}"}' \
|
|
"${includePaths}"
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
qt6.wrapQtAppsHook
|
|
];
|
|
|
|
buildInputs = [
|
|
qt6.qtbase
|
|
];
|
|
|
|
postInstall = ''
|
|
cp -r $out/ElaWidgetTools/* $out/
|
|
rm -rf $out/ElaWidgetTools
|
|
'';
|
|
|
|
meta = {
|
|
mainProgram = "ElaWidgetToolsExample";
|
|
maintainers = with lib.maintainers; [ xddxdd ];
|
|
description = "Fluent-UI For QT-Widget";
|
|
homepage = "https://github.com/Liniyous/ElaWidgetTools";
|
|
license = lib.licenses.mit;
|
|
};
|
|
})
|