diff --git a/pkgs/development/tools/qtcreator/default.nix b/pkgs/development/tools/qtcreator/default.nix index 603c69a4fc9f..cabba61c97cc 100644 --- a/pkgs/development/tools/qtcreator/default.nix +++ b/pkgs/development/tools/qtcreator/default.nix @@ -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 = '' diff --git a/pkgs/development/tools/qtcreator/with-plugins.nix b/pkgs/development/tools/qtcreator/with-plugins.nix new file mode 100644 index 000000000000..6aa7b5f7d76b --- /dev/null +++ b/pkgs/development/tools/qtcreator/with-plugins.nix @@ -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 + ]; +}