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

34 lines
780 B
Nix
Raw Permalink 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;};
passthru.updateScript =
if name == "activitypub"
then ./update.sh
else [];
};
})
plugins)