shell.nix 712 B

12345678910111213141516171819202122232425262728
  1. # shell.nix
  2. { pkgs ? import <nixpkgs> {} }:
  3. pkgs.mkShell {
  4. packages = with pkgs; [
  5. gcc
  6. pkg-config
  7. meson
  8. ninja
  9. gtk4
  10. gtkmm4
  11. # runtime data GTK needs
  12. adwaita-icon-theme
  13. hicolor-icon-theme
  14. gsettings-desktop-schemas
  15. shared-mime-info
  16. librsvg
  17. ];
  18. shellHook = ''
  19. # GSettings schemas
  20. export GSETTINGS_SCHEMA_DIR=${pkgs.gsettings-desktop-schemas}/share/glib-2.0/schemas
  21. # Prepend icon/theme/mime dirs; note the Nix-escaped Bash expansion: ''${...}
  22. export XDG_DATA_DIRS=${pkgs.adwaita-icon-theme}/share:${pkgs.hicolor-icon-theme}/share:${pkgs.gsettings-desktop-schemas}/share:${pkgs.shared-mime-info}/share''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS
  23. '';
  24. }