devenv.nix 1016 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. { pkgs, lib, config, inputs, ... }:
  2. {
  3. # https://devenv.sh/packages/
  4. packages = with pkgs; [
  5. git
  6. # Cargo
  7. cargo-edit
  8. ];
  9. # https://devenv.sh/basics/
  10. env = {
  11. APP_GREET = "Hoppscotch";
  12. };
  13. # https://devenv.sh/scripts/
  14. scripts.hello.exec = "echo hello from $APP_GREET";
  15. enterShell = ''
  16. git --version
  17. '';
  18. # https://devenv.sh/tests/
  19. enterTest = ''
  20. echo "Running tests"
  21. '';
  22. # https://devenv.sh/integrations/dotenv/
  23. dotenv.enable = true;
  24. # https://devenv.sh/languages/
  25. languages.rust = {
  26. enable = true;
  27. channel = "nightly";
  28. components = [
  29. "rustc"
  30. "cargo"
  31. "clippy"
  32. "rustfmt"
  33. "rust-analyzer"
  34. "llvm-tools-preview"
  35. "rust-src"
  36. "rustc-codegen-cranelift-preview"
  37. ];
  38. };
  39. # https://devenv.sh/pre-commit-hooks/
  40. # pre-commit.hooks.shellcheck.enable = true;
  41. # https://devenv.sh/processes/
  42. # processes.ping.exec = "ping example.com";
  43. # See full reference at https://devenv.sh/reference/options/
  44. }