diff options
author | Falco Peijnenburg <fpeijnenburg@gmail.com> | 2019-01-04 12:01:18 +0100 |
---|---|---|
committer | Falco Peijnenburg <fpeijnenburg@gmail.com> | 2019-01-06 17:51:31 +0100 |
commit | 9d2c9157d77c2f183c1c5cee37dd625bf55183d7 (patch) | |
tree | 789b75e86b43fb53c8848ac30e064f71ddd9799e /nixos | |
parent | b27b443e145863b5b7f502d8beccb6767572f3c3 (diff) | |
download | nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.tar nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.tar.gz nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.tar.bz2 nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.tar.lz nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.tar.xz nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.tar.zst nixlib-9d2c9157d77c2f183c1c5cee37dd625bf55183d7.zip |
nixos/apache-httpd/wordpress: copy plugins and themes instead of symlinking
Symlinking works for most plugins and themes, but Avada, for instance, fails to understand the symlink, causing its file path stripping to fail. This results in requests that look like: https://example.com/wp-content//nix/store/...plugin/path/some-file.js Since hard linking directories is not allowed, copying is the next best thing.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/web-servers/apache-httpd/wordpress.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nixos/modules/services/web-servers/apache-httpd/wordpress.nix b/nixos/modules/services/web-servers/apache-httpd/wordpress.nix index c810b914e258..c68bfd25f6a8 100644 --- a/nixos/modules/services/web-servers/apache-httpd/wordpress.nix +++ b/nixos/modules/services/web-servers/apache-httpd/wordpress.nix @@ -85,10 +85,10 @@ let # remove bundled themes(s) coming with wordpress rm -Rf $out/wp-content/themes/* - # symlink additional theme(s) - ${concatMapStrings (theme: "ln -s ${theme} $out/wp-content/themes/${theme.name}\n") config.themes} - # symlink additional plugin(s) - ${concatMapStrings (plugin: "ln -s ${plugin} $out/wp-content/plugins/${plugin.name}\n") (config.plugins) } + # copy additional theme(s) + ${concatMapStrings (theme: "cp -r ${theme} $out/wp-content/themes/${theme.name}\n") config.themes} + # copy additional plugin(s) + ${concatMapStrings (plugin: "cp -r ${plugin} $out/wp-content/plugins/${plugin.name}\n") (config.plugins) } # symlink additional translation(s) mkdir -p $out/wp-content/languages |