shell.nix 735 B

123456789101112131415161718192021222324252627282930
  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. sqlite
  12. openssl
  13. # runtime data GTK needs
  14. adwaita-icon-theme
  15. hicolor-icon-theme
  16. gsettings-desktop-schemas
  17. shared-mime-info
  18. librsvg
  19. ];
  20. shellHook = ''
  21. # GSettings schemas
  22. export GSETTINGS_SCHEMA_DIR=${pkgs.gsettings-desktop-schemas}/share/glib-2.0/schemas
  23. # Prepend icon/theme/mime dirs; note the Nix-escaped Bash expansion: ''${...}
  24. 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
  25. '';
  26. }