wrbapp/devenv.nix

47 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";
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/
packages = [ pkgs.openssl pkgs.git pkgs.dioxus-cli 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";
# See full reference at https://devenv.sh/reference/options/
}