Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/wordpress: Add language support #191079

Merged
merged 1 commit into from
Sep 30, 2022
Merged

Conversation

onny
Copy link
Contributor

@onny onny commented Sep 13, 2022

Description of changes

Fixes #75598

Example usage

{ pkgs, ... }: let

  language-de = pkgs.stdenv.mkDerivation {
    name = "language-de";
    src = pkgs.fetchurl {
      url = "https://de.wordpress.org/wordpress-6.0.1-de_DE.tar.gz";
      sha256 = "sha256-dlas0rXTSV4JAl8f/UyMbig57yURRYRhTMtJwF9g8h0=";
    };
    installPhase = "mkdir -p $out; cp -r ./wp-content/languages/* $out/";
  };

in {

  services.httpd.adminAddr = "hello@example.org";

  services.wordpress.sites."localhost" = {
    enable = true;
    languages = [ language-de ];
    extraConfig = ''
      # Wordpress will be in German from the start on, no need to
      # set in manually
      define ('WPLANG', 'de_DE');
    '';
  };

}

Missing

  • Test it
  • Release notes
  • Tests
  • Note where to get available languages
  • Add documentation to NIxOS Wiki Wordpress article
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
nixos/modules/services/web-apps/wordpress.nix Outdated Show resolved Hide resolved
@onny
Copy link
Contributor Author

onny commented Sep 26, 2022

@ofborg eval

@onny
Copy link
Contributor Author

onny commented Sep 28, 2022

Hey, I really would be happy to have this feature integrated. Already using it with a few Wordpress installations on my NixOS servers and it works as intended. Usage is also described on the NixOS wiki https://nixos.wiki/wiki/Wordpress

@onny onny requested a review from dasJ September 29, 2022 10:14
@onny
Copy link
Contributor Author

onny commented Sep 29, 2022

Okay done :)

@onny onny requested a review from mohe2015 September 29, 2022 11:42
@mmilata mmilata removed their request for review September 29, 2022 18:39
@onny onny requested a review from ajs124 September 30, 2022 07:35
@happysalada happysalada merged commit b881869 into NixOS:master Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wordpress: no option to add languages
5 participants