qtcreator: added function to compose package with plug-ins
This commit is contained in:
@@ -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
pkgs/development/tools/qtcreator/with-plugins.nix
Normal file
23
pkgs/development/tools/qtcreator/with-plugins.nix
Normal 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
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user