You've already forked tribes-plugin-supertest
forked from tribes/tribes-plugin-template
afc38412c4
Provide a Nix glibc locale archive with en_GB.UTF-8 so tools inside the devenv shell inherit a valid UTF-8 locale.
70 lines
1.3 KiB
Nix
70 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
devLocales = pkgs.glibcLocales.override {
|
|
allLocales = false;
|
|
locales = [
|
|
"en_GB.UTF-8/UTF-8"
|
|
"en_US.UTF-8/UTF-8"
|
|
];
|
|
};
|
|
in {
|
|
env = {
|
|
LANG = "en_GB.UTF-8";
|
|
LOCALE_ARCHIVE = "${devLocales}/lib/locale/locale-archive";
|
|
MIX_OS_DEPS_COMPILE_PARTITION_COUNT = 8;
|
|
# If this plugin adds npm-managed assets later, enable languages.javascript
|
|
# below and set NPM_CONFIG_MIN_RELEASE_AGE = "7".
|
|
};
|
|
|
|
packages = with pkgs;
|
|
[
|
|
git
|
|
alejandra
|
|
prettier
|
|
]
|
|
++ lib.optionals pkgs.stdenv.isLinux [
|
|
inotify-tools
|
|
];
|
|
|
|
languages = {
|
|
elixir = {
|
|
enable = true;
|
|
package = pkgs.elixir_1_19;
|
|
};
|
|
|
|
# javascript = {
|
|
# enable = true;
|
|
# package = pkgs.nodejs_24;
|
|
# npm.enable = true;
|
|
# };
|
|
};
|
|
|
|
dotenv.enable = true;
|
|
devenv.warnOnNewVersion = false;
|
|
|
|
git-hooks.hooks = {
|
|
alejandra.enable = true;
|
|
prettier.enable = true;
|
|
prettier.files = "\\.(js|ts|tsx|css)$";
|
|
check-added-large-files = {
|
|
enable = true;
|
|
args = ["--maxkb=131072"];
|
|
};
|
|
mix-format.enable = true;
|
|
mix-format.files = "\\.(ex|exs|heex)$";
|
|
};
|
|
|
|
enterShell = ''
|
|
echo
|
|
elixir --version
|
|
echo
|
|
'';
|
|
|
|
scripts = {
|
|
plugin.exec = ''bash "$DEVENV_ROOT/scripts/plugin" "$@"'';
|
|
};
|
|
}
|