qtcreator: added function to compose package with plug-ins

This commit is contained in:
mourogurt
2025-10-09 18:21:35 +03:00
parent 6c72e95bc4
commit 08057f1c6d
2 changed files with 28 additions and 0 deletions

View File

@@ -27,6 +27,7 @@
rustc-demangle,
elfutils,
perf,
callPackage,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -104,6 +105,10 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace ''${!outputDev}/lib/cmake/QtCreator/QtCreatorConfig.cmake --replace "$out/" ""
'';
passthru = {
withPackages = callPackage ./with-plugins.nix { };
};
meta = {
description = "Cross-platform IDE tailored to the needs of Qt developers";
longDescription = ''

View File

@@ -0,0 +1,23 @@
{
pkgs,
lib,
qtcreator,
...
}:
f:
let
plugins_arg = builtins.foldl' (
acc: val: acc + "-pluginpath ${val.outPath}/lib/qtcreator/plugins/"
) "" f;
qtcreator_runner = pkgs.writeShellScriptBin "qtcreator" ''
exec ${lib.getExe qtcreator} ${plugins_arg} "$@"
'';
in
pkgs.symlinkJoin {
inherit (qtcreator) version meta;
name = "qtcreator-with-plugins";
paths = [
qtcreator_runner
qtcreator
];
}