about summary refs log tree commit diff
path: root/pkgs/servers/web-apps
diff options
context:
space:
mode:
authorColin Arnott <colin@urandom.co.uk>2023-01-04 11:14:52 +0000
committerColin Arnott <colin@urandom.co.uk>2023-01-04 11:20:25 +0000
commitf9d1f80045d3ae01741896127837eba9f1559603 (patch)
treeffa052b92916057ee1981215134ed4e3002dc26a /pkgs/servers/web-apps
parent35e88e278baac3f09f4dfa9c72d76aeb7d913a5b (diff)
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
Diffstat (limited to 'pkgs/servers/web-apps')
-rw-r--r--pkgs/servers/web-apps/wordpress/default.nix39
-rw-r--r--pkgs/servers/web-apps/wordpress/generic.nix36
2 files changed, 41 insertions, 34 deletions
diff --git a/pkgs/servers/web-apps/wordpress/default.nix b/pkgs/servers/web-apps/wordpress/default.nix
index 0ef9fbfc924e3..8c8a65360c14c 100644
--- a/pkgs/servers/web-apps/wordpress/default.nix
+++ b/pkgs/servers/web-apps/wordpress/default.nix
@@ -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=";
   };
 }
diff --git a/pkgs/servers/web-apps/wordpress/generic.nix b/pkgs/servers/web-apps/wordpress/generic.nix
new file mode 100644
index 0000000000000..3c9aa377d7704
--- /dev/null
+++ b/pkgs/servers/web-apps/wordpress/generic.nix
@@ -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;
+  };
+}