nixpkgs/pkgs/servers/web-apps/wordpress/packages/generate.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
696 B
Bash
Raw Normal View History

2022-05-19 13:48:13 +00:00
#!/usr/bin/env nix-shell
2023-05-17 14:15:12 +00:00
#!nix-shell -i bash -p wp4nix jq
2022-05-19 13:48:13 +00:00
set -e
set -u
set -o pipefail
set -x
2023-05-17 14:15:12 +00:00
cd $(dirname "$0")
2022-12-31 18:04:36 +00:00
nixFlags="--option experimental-features nix-command eval --raw --impure --expr"
2023-05-17 14:15:12 +00:00
export NIX_PATH=nixpkgs=../../../../..
2022-05-19 13:48:13 +00:00
export WP_VERSION=$(nix $nixFlags '(import <nixpkgs> {}).wordpress.version')
PLUGINS=`cat wordpress-plugins.json | jq -r 'keys|.[]' | sed -z 's/\n/,/g;s/,$/\n/'`
THEMES=`cat wordpress-themes.json | jq -r 'keys|.[]' | sed -z 's/\n/,/g;s/,$/\n/'`
LANGUAGES=`cat wordpress-languages.json | jq -r 'keys|.[]' | sed -z 's/\n/,/g;s/,$/\n/'`
2022-05-19 13:48:13 +00:00
wp4nix -p $PLUGINS -pl en
wp4nix -t $THEMES -tl en
wp4nix -l $LANGUAGES
rm *.log themeLanguages.json pluginLanguages.json