wordpress: Add passthru.updateScript
Co-authored-by: Moritz Hedtke <moritz.hedtke@t-online.de>
This commit is contained in:
co-authored by
Moritz Hedtke
parent
0ea721a941
commit
30ccd36bc5
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user