at 23.05-pre 36 lines 1.0 kB view raw
1{ lib, stdenv, fetchurl, nixosTests, writeScript }: 2 3stdenv.mkDerivation rec { 4 pname = "wordpress"; 5 version = "6.0.3"; 6 7 src = fetchurl { 8 url = "https://wordpress.org/${pname}-${version}.tar.gz"; 9 sha256 = "sha256-eSi0qwzXoJ1wYUzi34s7QbBbwRm2hfXoyGFivhPBq5o="; 10 }; 11 12 installPhase = '' 13 mkdir -p $out/share/wordpress 14 cp -r . $out/share/wordpress 15 ''; 16 17 passthru.tests = { 18 inherit (nixosTests) wordpress; 19 }; 20 21 passthru.updateScript = writeScript "update.sh" '' 22 #!/usr/bin/env nix-shell 23 #!nix-shell -i bash -p common-updater-scripts jq 24 set -eu -o pipefail 25 version=$(curl --globoff "https://api.wordpress.org/core/version-check/1.7/" | jq -r '.offers[0].version') 26 update-source-version wordpress $version 27 ''; 28 29 meta = with lib; { 30 homepage = "https://wordpress.org"; 31 description = "WordPress is open source software you can use to create a beautiful website, blog, or app"; 32 license = [ licenses.gpl2 ]; 33 maintainers = [ maintainers.basvandijk ]; 34 platforms = platforms.all; 35 }; 36}