jetbrains: rework following the Emacs builder

This commit moves a lot of the heavy lifting out of callPackage and back
into regular import, following conventions from upstream Nixpkgs. It
allows for a clearer and less magic definition of new packages,
particularly by downstream, as well, by exposing the *Build package
callers in the attribute set.
This commit is contained in:
2020-10-18 17:47:48 +11:00
parent 1a129ac179
commit 7959b877d9
8 changed files with 154 additions and 78 deletions

View File

@ -1,15 +1,29 @@
{ callPackage }:
{ lib, stdenv, fetchzip }:
self:
let
mkPlugin = callPackage ./build-plugin.nix {
ideaBuild = import ../../../build-support/jetbrains/plugin.nix {
inherit lib stdenv fetchzip;
jetbrainsPlatforms = [ "idea-community" "idea-ultimate" ];
};
in
{
spring-assistant = mkPlugin {
pname = "intellij-spring-assistant";
version = "0.12.0";
pluginId = 10229;
versionId = 44968;
sha256 = "13cglywzhb4j0qj0bs2jwaz2k8pxrxalv35wgkmgkxr635bxmwsj";
};
}
generateIdea = lib.makeOverridable ({
idea ? ./manual-idea-packages.nix
}: let
imported = import idea {
inherit (self) callPackage;
};
super = imported;
overrides = { };
ideaPlugins = super // overrides;
in ideaPlugins // { inherit ideaBuild; });
in generateIdea { }