2022-09-26 17:34:59 +01:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests, writeScript }:
|
2019-05-28 22:38:34 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wordpress";
|
2022-09-22 17:21:05 +01:00
|
|
|
version = "6.0.2";
|
2019-05-28 22:38:34 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://wordpress.org/${pname}-${version}.tar.gz";
|
2022-09-22 17:21:05 +01:00
|
|
|
sha256 = "sha256-UG5FYlJowBy71DJHgoDE1/lIIndp0qx1yFlDIeMV0Og=";
|
2019-05-28 22:38:34 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/wordpress
|
|
|
|
cp -r . $out/share/wordpress
|
|
|
|
'';
|
|
|
|
|
2020-06-24 15:49:37 +01:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) wordpress;
|
|
|
|
};
|
|
|
|
|
2022-09-26 17:34:59 +01:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-05-28 22:38:34 +01:00
|
|
|
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;
|
2017-03-14 15:11:51 +00:00
|
|
|
};
|
|
|
|
}
|