2020-10-18 17:47:48 +11:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-10-15 19:05:13 +11:00
|
|
|
, fetchzip
|
|
|
|
, jetbrainsPlatforms
|
|
|
|
}:
|
|
|
|
|
|
|
|
{ pluginId
|
|
|
|
, pname
|
|
|
|
, version
|
|
|
|
, versionId
|
|
|
|
, sha256
|
|
|
|
, filename ? "${pname}-${version}.zip"
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2020-10-18 17:47:48 +11:00
|
|
|
inherit pname version;
|
2020-10-15 19:05:13 +11:00
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
inherit sha256;
|
|
|
|
url = "https://plugins.jetbrains.com/files/${toString pluginId}/${toString versionId}/${filename}";
|
|
|
|
};
|
|
|
|
|
2020-10-18 17:47:48 +11:00
|
|
|
passthru = { inherit jetbrainsPlatforms; };
|
|
|
|
|
2020-10-15 19:05:13 +11:00
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -r * $out/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-10-18 17:47:48 +11:00
|
|
|
homepage = "https://plugins.jetbrains.com/plugin/${pluginId}-${lib.toLower pname}";
|
2020-10-15 19:05:13 +11:00
|
|
|
};
|
|
|
|
}
|