You've already forked tribes-plugin-trust
f08af20cd5
CI / Test (push) Failing after 19s
Provide a Nix glibc locale archive with en_GB.UTF-8 so tools inside the devenv shell inherit a valid UTF-8 locale.
73 lines
1.3 KiB
Nix
73 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;
|
|
NODE_ENV = "development";
|
|
# Delay npm dependency resolution to reduce rushed supply-chain updates.
|
|
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 -n "Node.js "
|
|
node --version
|
|
echo
|
|
'';
|
|
|
|
scripts = {
|
|
plugin.exec = ''bash "$DEVENV_ROOT/scripts/plugin" "$@"'';
|
|
};
|
|
}
|