wrbapp/devenv.nix

48 lines
1.3 KiB
Nix
Raw Normal View History

2024-07-17 21:33:39 +02:00
{ pkgs, lib, config, inputs, ... }:
{
# https://devenv.sh/basics/
env.GREET = "devenv";
env.LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
2024-09-23 12:34:59 +02:00
env.BINDGEN_EXTRA_CLANG_ARGS = "-I ${pkgs.libclang.lib}/lib/clang/17/include";
2024-07-17 21:33:39 +02:00
# https://devenv.sh/packages/
2024-09-07 20:02:24 +02:00
packages = [ pkgs.openssl pkgs.git pkgs.tailwindcss pkgs.watchexec pkgs.libclang pkgs.clang ];
2024-07-17 21:33:39 +02:00
# https://devenv.sh/scripts/
scripts.hello.exec = "echo hello from $GREET";
enterShell = ''
hello
git --version
'';
# https://devenv.sh/tests/
enterTest = ''
echo "Running tests"
git --version | grep "2.42.0"
'';
# https://devenv.sh/services/
# services.postgres.enable = true;
# https://devenv.sh/languages/
languages.rust.enable = true;
languages.rust.channel = "stable";
languages.rust.targets = [ "wasm32-unknown-unknown" ];
languages.javascript.enable = true;
languages.javascript.npm.enable = true;
languages.javascript.npm.install.enable = true;
# https://devenv.sh/pre-commit-hooks/
# pre-commit.hooks.shellcheck.enable = true;
# https://devenv.sh/processes/
processes.tailwind.exec = "watchexec -e rs ${lib.getExe pkgs.tailwindcss} -i input.css -o assets/tailwind.css";
processes.dioxus.exec = "dx serve";
2024-10-06 18:52:08 +02:00
processes.surrealdb.exec = "docker compose up";
2024-07-17 21:33:39 +02:00
# See full reference at https://devenv.sh/reference/options/
}