diff --git a/.woodpecker/update.yaml b/.woodpecker/update.yaml index 9cb3c72..d7c39f9 100644 --- a/.woodpecker/update.yaml +++ b/.woodpecker/update.yaml @@ -118,4 +118,5 @@ matrix: - python-instagram - element-web - woodpecker-server + - wordpress-plugins skip_clone: true diff --git a/default.nix b/default.nix index 1cfce43..9e09de3 100644 --- a/default.nix +++ b/default.nix @@ -68,6 +68,7 @@ in woodpecker-server hydra hydra-unstable + wordpress-plugins ; } // ( diff --git a/flake.nix b/flake.nix index ee8127f..5c53f94 100644 --- a/flake.nix +++ b/flake.nix @@ -111,6 +111,7 @@ woodpecker-server hydra hydra-unstable + wordpress-plugins ; } // ( diff --git a/overlay.nix b/overlay.nix index 62ac214..da2c9a0 100644 --- a/overlay.nix +++ b/overlay.nix @@ -82,6 +82,7 @@ system: self: super: let ]; }); hydra-unstable = self.hydra; + wordpress-plugins = self.callPackage ./web/wordpress-plugins {}; }) riscv-overlay ]; diff --git a/web/wordpress-plugins/activitypub.json b/web/wordpress-plugins/activitypub.json new file mode 100644 index 0000000..77ede2f --- /dev/null +++ b/web/wordpress-plugins/activitypub.json @@ -0,0 +1,7 @@ +{ + "version": "0.17.0", + "pname": "activitypub", + "description": "ActivityPub", + "url": "https://downloads.wordpress.org/plugin/activitypub.0.17.0.zip", + "sha256": "5803f6fa28e243e969a8499da528feefb02f16d1683b95f421d89b6090cad315" +} diff --git a/web/wordpress-plugins/default.nix b/web/wordpress-plugins/default.nix new file mode 100644 index 0000000..cd7765e --- /dev/null +++ b/web/wordpress-plugins/default.nix @@ -0,0 +1,33 @@ +{ + stdenv, + fetchurl, + lib, + unzip +}: +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 { + inherit (source) url sha256; + }; + nativeBuildInputs = [unzip]; + unpackPhase = '' + unzip $src + ''; + installPhase = "mkdir -p $out; cp -R * $out/"; + meta = {inherit (source) description;}; + passthru.updateScript = + if name == "activitypub" + then ./update.sh + else []; + }; + }) + plugins) diff --git a/web/wordpress-plugins/google-sitemap-generator.json b/web/wordpress-plugins/google-sitemap-generator.json new file mode 100644 index 0000000..3975fbe --- /dev/null +++ b/web/wordpress-plugins/google-sitemap-generator.json @@ -0,0 +1,7 @@ +{ + "version": "4.1.10", + "pname": "google-sitemap-generator", + "description": "Sitemap Generator for Google", + "url": "https://downloads.wordpress.org/plugin/google-sitemap-generator.4.1.10.zip", + "sha256": "17c0982c3505e7dcb69eef1537524e33ce9e817e82acd89fa57c82226b0175cc" +} diff --git a/web/wordpress-plugins/indieauth.json b/web/wordpress-plugins/indieauth.json new file mode 100644 index 0000000..b79d254 --- /dev/null +++ b/web/wordpress-plugins/indieauth.json @@ -0,0 +1,7 @@ +{ + "version": "4.2.1", + "pname": "indieauth", + "description": "IndieAuth", + "url": "https://downloads.wordpress.org/plugin/indieauth.4.2.1.zip", + "sha256": "ad151c5c25b55b0d139f3d5df8cd3c298fc7cd2d947c602e3681199e95f8c7ab" +} diff --git a/web/wordpress-plugins/indieweb-post-kinds.json b/web/wordpress-plugins/indieweb-post-kinds.json new file mode 100644 index 0000000..815027d --- /dev/null +++ b/web/wordpress-plugins/indieweb-post-kinds.json @@ -0,0 +1,7 @@ +{ + "version": "3.6.4", + "pname": "indieweb-post-kinds", + "description": "Post Kinds", + "url": "https://downloads.wordpress.org/plugin/indieweb-post-kinds.3.6.4.zip", + "sha256": "186118759081545322becba1d4a2124de0d0e0cb33a3895aad964d932338fac1" +} diff --git a/web/wordpress-plugins/indieweb.json b/web/wordpress-plugins/indieweb.json new file mode 100644 index 0000000..1c4aa0c --- /dev/null +++ b/web/wordpress-plugins/indieweb.json @@ -0,0 +1,7 @@ +{ + "version": "4.0.0", + "pname": "indieweb", + "description": "IndieWeb", + "url": "https://downloads.wordpress.org/plugin/indieweb.4.0.0.zip", + "sha256": "0b3d3b0131cd29c24bb52663cba0e56c989a5b95135027a14747c83a46d2a73f" +} diff --git a/web/wordpress-plugins/jetpack.json b/web/wordpress-plugins/jetpack.json new file mode 100644 index 0000000..8df70db --- /dev/null +++ b/web/wordpress-plugins/jetpack.json @@ -0,0 +1,7 @@ +{ + "version": "12.0", + "pname": "jetpack", + "description": "Jetpack – WP Security, Backup, Speed, & Growth", + "url": "https://downloads.wordpress.org/plugin/jetpack.12.0.zip", + "sha256": "db722fd367ac1a2b4c5c47e213a16e9e06ad1a3e458257f708c55cdc69c51004" +} diff --git a/web/wordpress-plugins/micropub.json b/web/wordpress-plugins/micropub.json new file mode 100644 index 0000000..96ead6c --- /dev/null +++ b/web/wordpress-plugins/micropub.json @@ -0,0 +1,7 @@ +{ + "version": "2.3.3", + "pname": "micropub", + "description": "Micropub", + "url": "https://downloads.wordpress.org/plugin/micropub.2.3.3.zip", + "sha256": "98fcdb898e5d07d200b7c856f084e031d63098233ad2ecd4e54a87b9827c64b8" +} diff --git a/web/wordpress-plugins/plugins b/web/wordpress-plugins/plugins new file mode 100644 index 0000000..58f3ad0 --- /dev/null +++ b/web/wordpress-plugins/plugins @@ -0,0 +1,11 @@ +jetpack +wp-super-cache +google-sitemap-generator +indieweb +pubsubhubbub +indieweb-post-kinds +indieauth +syndication-links +micropub +webmention +activitypub diff --git a/web/wordpress-plugins/pubsubhubbub.json b/web/wordpress-plugins/pubsubhubbub.json new file mode 100644 index 0000000..1849021 --- /dev/null +++ b/web/wordpress-plugins/pubsubhubbub.json @@ -0,0 +1,7 @@ +{ + "version": "3.1.3", + "pname": "pubsubhubbub", + "description": "WebSub (FKA. PubSubHubbub)", + "url": "https://downloads.wordpress.org/plugin/pubsubhubbub.3.1.3.zip", + "sha256": "c8fe11b6e194ae08c978bdbda8aec92d80dd98c4102d956b387137ac40ca5663" +} diff --git a/web/wordpress-plugins/syndication-links.json b/web/wordpress-plugins/syndication-links.json new file mode 100644 index 0000000..571c88c --- /dev/null +++ b/web/wordpress-plugins/syndication-links.json @@ -0,0 +1,7 @@ +{ + "version": "4.4.7", + "pname": "syndication-links", + "description": "Syndication Links", + "url": "https://downloads.wordpress.org/plugin/syndication-links.4.4.7.zip", + "sha256": "097632f047a1a290a79cb66b9d28c0675c959c0c4a00576790e2d0b96c223b4b" +} diff --git a/web/wordpress-plugins/update.sh b/web/wordpress-plugins/update.sh new file mode 100755 index 0000000..dc354a2 --- /dev/null +++ b/web/wordpress-plugins/update.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p curl jq + + +set -ex + +for plugin in $(cat plugins); do + META=$(curl https://api.wordpress.org/plugins/info/1.0/$plugin.json) + SHA256=$(curl $(echo $META | jq -r '.versions[.version]') | sha256sum | awk '{print $1}') + echo $META | jq '{"version": .version, "pname": .slug, "description": .name, "url": .versions[.version], "sha256": $SHA256}' --arg SHA256 $SHA256 > $plugin.json +done diff --git a/web/wordpress-plugins/webmention.json b/web/wordpress-plugins/webmention.json new file mode 100644 index 0000000..2becb8a --- /dev/null +++ b/web/wordpress-plugins/webmention.json @@ -0,0 +1,7 @@ +{ + "version": "5.0.0", + "pname": "webmention", + "description": "Webmention", + "url": "https://downloads.wordpress.org/plugin/webmention.5.0.0.zip", + "sha256": "3530a1b516d76f8108bb3adab9022c4293b354f6b6cf3c62b47bacda933086d9" +} diff --git a/web/wordpress-plugins/wp-super-cache.json b/web/wordpress-plugins/wp-super-cache.json new file mode 100644 index 0000000..88be3f3 --- /dev/null +++ b/web/wordpress-plugins/wp-super-cache.json @@ -0,0 +1,7 @@ +{ + "version": "1.9.4", + "pname": "wp-super-cache", + "description": "WP Super Cache", + "url": "https://downloads.wordpress.org/plugin/wp-super-cache.1.9.4.zip", + "sha256": "9e9cc68a9a02a886f144157fa318fc90a10017b5b26b10569e075b10909b8d15" +}