This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/web/wordpress-plugins/default.nix

33 lines
711 B
Nix
Raw Normal View History

2023-04-25 06:31:46 +00:00
{
stdenv,
fetchurl,
lib,
2023-04-25 14:22:41 +00:00
unzip,
2023-04-25 06:31:46 +00:00
}:
with builtins;
with lib; let
plugins = lists.init (splitString "\n" (readFile ./plugins));
in
listToAttrs (map (name: {
inherit name;
value = let
source = importJSON ./${name}.json;
in
stdenv.mkDerivation {
inherit (source) pname version;
src = fetchurl {
2023-04-25 07:06:35 +00:00
inherit (source) url sha256;
2023-04-25 06:31:46 +00:00
};
2023-04-25 07:20:07 +00:00
nativeBuildInputs = [unzip];
unpackPhase = ''
unzip $src
'';
2023-04-25 08:31:35 +00:00
installPhase = "mkdir -p $out; cp -R $pname/* $out/";
2023-04-25 06:31:46 +00:00
meta = {inherit (source) description;};
};
})
plugins)
2023-06-25 13:25:50 +00:00
// {
passthru.updateScript = ./update.sh;
}