Merge pull request #193061 from onny/wordpress-updatescript

This commit is contained in:
Sandro 2022-09-28 00:04:54 +02:00 committed by GitHub
commit 6910e5840f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, nixosTests }:
{ lib, stdenv, fetchurl, nixosTests, writeScript }:
stdenv.mkDerivation rec {
pname = "wordpress";
@ -18,6 +18,14 @@ stdenv.mkDerivation rec {
inherit (nixosTests) wordpress;
};
passthru.updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts jq
set -eu -o pipefail
version=$(curl --globoff "https://api.wordpress.org/core/version-check/1.7/" | jq -r '.offers[0].version')
update-source-version wordpress $version
'';
meta = with lib; {
homepage = "https://wordpress.org";
description = "WordPress is open source software you can use to create a beautiful website, blog, or app";