nur-packages/pkgs/applications/editors/jetbrains/build-plugin.nix

31 lines
527 B
Nix
Raw Normal View History

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