Unverified Commit 08057f1c authored by mourogurt's avatar mourogurt
Browse files

qtcreator: added function to compose package with plug-ins

parent 6c72e95b
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 = ''
+23 −0
Original line number Diff line number Diff line
{
  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
  ];
}