xeals
7959b877d9
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.
34 lines
554 B
Nix
34 lines
554 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchzip
|
|
, jetbrainsPlatforms
|
|
}:
|
|
|
|
{ pluginId
|
|
, pname
|
|
, version
|
|
, versionId
|
|
, sha256
|
|
, filename ? "${pname}-${version}.zip"
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
inherit pname version;
|
|
|
|
src = fetchzip {
|
|
inherit sha256;
|
|
url = "https://plugins.jetbrains.com/files/${toString pluginId}/${toString versionId}/${filename}";
|
|
};
|
|
|
|
passthru = { inherit jetbrainsPlatforms; };
|
|
|
|
installPhase = ''
|
|
mkdir $out
|
|
cp -r * $out/
|
|
'';
|
|
|
|
meta = {
|
|
homepage = "https://plugins.jetbrains.com/plugin/${pluginId}-${lib.toLower pname}";
|
|
};
|
|
}
|