qtcreator: added function to compose package with plugins (#438322)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
runCommand,
|
||||
cmake,
|
||||
pkg-config,
|
||||
qttools,
|
||||
@@ -50,6 +51,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
installPhase = "mkdir -p $out; cp -R lib $out/";
|
||||
|
||||
passthru.tests = {
|
||||
test-version = runCommand "${finalAttrs.pname}-test" { } ''
|
||||
QT_QPA_PLATFORM="offscreen" ${
|
||||
lib.getExe (qtcreator.withPackages [ finalAttrs.finalPackage ])
|
||||
} --version > $out
|
||||
cat $out | grep 'qodeassist ${finalAttrs.version}'
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "AI-powered coding assistant plugin for Qt Creator";
|
||||
longDescription = ''
|
||||
@@ -62,6 +72,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
homepage = "https://github.com/Palm1r/QodeAssist";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = [ lib.maintainers.zatm8 ];
|
||||
platforms = lib.platforms.linux;
|
||||
platforms = qtcreator.meta.platforms;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -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