wordpress6_1: init at 6.1.1

release-22.11 currently tracks 6.0 for pkgs.wordpress. This means there
is no way to opt in to the newer version. Similiar to nextcloud and go,
we have broken out a new derivation to opt in. It is a nop for unstable,
and only useful when backported.

Updates #208529
This commit is contained in:
Colin Arnott 2023-01-04 11:14:52 +00:00
parent 35e88e278b
commit f9d1f80045
No known key found for this signature in database
GPG Key ID: 0447A663F7F3E236
3 changed files with 42 additions and 35 deletions

View File

@ -1,36 +1,7 @@
{ lib, stdenv, fetchurl, nixosTests, writeScript }:
stdenv.mkDerivation rec {
pname = "wordpress";
version = "6.1.1";
src = fetchurl {
url = "https://wordpress.org/${pname}-${version}.tar.gz";
sha256 = "sha256-IR6FSmm3Pd8cCHNQTH1oIaLYsEP1obVjr0bDJkD7H60=";
};
installPhase = ''
mkdir -p $out/share/wordpress
cp -r . $out/share/wordpress
'';
passthru.tests = {
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";
license = [ licenses.gpl2 ];
maintainers = [ maintainers.basvandijk ];
platforms = platforms.all;
{ callPackage }: builtins.mapAttrs (_: callPackage ./generic.nix) rec {
wordpress = wordpress6_1;
wordpress6_1 = {
version = "6.1.1";
hash = "sha256-IR6FSmm3Pd8cCHNQTH1oIaLYsEP1obVjr0bDJkD7H60=";
};
}

View File

@ -0,0 +1,36 @@
{ lib, version, hash, stdenv, fetchurl, nixosTests, writeScript }:
stdenv.mkDerivation rec {
pname = "wordpress";
inherit version;
src = fetchurl {
url = "https://wordpress.org/${pname}-${version}.tar.gz";
inherit hash;
};
installPhase = ''
mkdir -p $out/share/wordpress
cp -r . $out/share/wordpress
'';
passthru.tests = {
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";
license = [ licenses.gpl2 ];
maintainers = [ maintainers.basvandijk ];
platforms = platforms.all;
};
}

View File

@ -37887,7 +37887,7 @@ with pkgs;
wmutils-opt = callPackage ../tools/X11/wmutils-opt { };
wordpress = callPackage ../servers/web-apps/wordpress { };
inherit (callPackage ../servers/web-apps/wordpress {}) wordpress wordpress6_1;
wordpressPackages = ( callPackage ../servers/web-apps/wordpress/packages {
plugins = lib.importJSON ../servers/web-apps/wordpress/packages/plugins.json;