summaryrefslogtreecommitdiff
path: root/devenv.nix
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2026-07-21 14:07:41 +0200
committercashmere <cashmere@autistici.org>2026-07-21 14:07:41 +0200
commit85f0a9e875eee768766d7bdd24272d348f6b1e33 (patch)
tree941f6b9952ece1f5057677281387d669333d2f96 /devenv.nix
parentefe1dbef45a55f0cd5adb6885f5917d8cf10e4d9 (diff)
downloadi3bar-mango-85f0a9e875eee768766d7bdd24272d348f6b1e33.tar.gz
add devenv environment with rust toolchain and pango/cairo system deps
pangocairo's -sys crates need glib/cairo/pango via pkg-config; provide them through devenv so cargo build works on NixOS.
Diffstat (limited to 'devenv.nix')
-rw-r--r--devenv.nix58
1 files changed, 58 insertions, 0 deletions
diff --git a/devenv.nix b/devenv.nix
new file mode 100644
index 0000000..6db7400
--- /dev/null
+++ b/devenv.nix
@@ -0,0 +1,58 @@
+{ pkgs, lib, config, inputs, ... }:
+
+{
+ # https://devenv.sh/basics/
+ env.GREET = "devenv";
+
+ # https://devenv.sh/packages/
+ packages = [
+ pkgs.git
+ # Needed by Emacs (flycheck-rust/eglot) outside of a full rustup env
+ pkgs.rust-analyzer
+ pkgs.rustfmt
+ pkgs.clippy
+ # System libraries required by pangocairo (via pkg-config)
+ pkgs.pkg-config
+ pkgs.glib
+ pkgs.cairo
+ pkgs.pango
+ pkgs.harfbuzz
+ ];
+
+ # https://devenv.sh/languages/
+ languages.rust.enable = true;
+
+ # https://devenv.sh/processes/
+ # processes.dev.exec = "${lib.getExe pkgs.watchexec} -n -- ls -la";
+
+ # https://devenv.sh/services/
+ # services.postgres.enable = true;
+
+ # https://devenv.sh/scripts/
+ scripts.hello.exec = ''
+ echo hello from $GREET
+ '';
+
+ # https://devenv.sh/basics/
+ enterShell = ''
+ hello # Run scripts directly
+ git --version # Use packages
+ '';
+
+ # https://devenv.sh/tasks/
+ # tasks = {
+ # "myproj:setup".exec = "mytool build";
+ # "devenv:enterShell".after = [ "myproj:setup" ];
+ # };
+
+ # https://devenv.sh/tests/
+ enterTest = ''
+ echo "Running tests"
+ git --version | grep --color=auto "${pkgs.git.version}"
+ '';
+
+ # https://devenv.sh/git-hooks/
+ # git-hooks.hooks.shellcheck.enable = true;
+
+ # See full reference at https://devenv.sh/reference/options/
+}