name: gnome-calculator
version: '48.1'
summary: GNOME Calculator
description: |
  GNOME Calculator is an application that solves mathematical equations.
  Though it at first appears to be a simple calculator with only basic
  arithmetic operations, you can switch into Advanced, Financial, or
  Programming mode to find a surprising set of capabilities.

  The Advanced calculator supports many operations, including:
  logarithms, factorials, trigonometric and hyperbolic functions,
  modulus division, complex numbers, random number generation, prime
  factorization and unit conversions.

  Financial mode supports several computations, including periodic interest
  rate, present and future value, double declining and straight line
  depreciation, and many others.

  Programming mode supports conversion between common bases (binary, octal,
  decimal, and hexadecimal), boolean algebra, one’s and two’s complementation,
  character to character code conversion, and more.
architectures:
- amd64
base: core24
assumes:
- command-chain
- snapd2.43
apps:
  gnome-calculator:
    command: usr/bin/gnome-calculator
    common-id: org.gnome.Calculator.desktop
    plugs:
    - desktop
    - desktop-legacy
    - gsettings
    - opengl
    - wayland
    - x11
    - network
    - network-status
    command-chain:
    - snap/command-chain/gpu-2404-wrapper
    - snap/command-chain/desktop-launch
confinement: strict
grade: stable
environment:
  SNAP_DESKTOP_RUNTIME: $SNAP/gnome-platform
  GTK_USE_PORTAL: '1'
  LD_LIBRARY_PATH: ${SNAP_LIBRARY_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
  PATH: $SNAP/usr/sbin:$SNAP/usr/bin:$SNAP/sbin:$SNAP/bin:$PATH
plugs:
  desktop:
    mount-host-font-cache: false
  gtk-3-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes
  sound-themes:
    interface: content
    target: $SNAP/data-dir/sounds
    default-provider: gtk-common-themes
  gnome-46-2404:
    interface: content
    target: $SNAP/gnome-platform
    default-provider: gnome-46-2404
  gpu-2404:
    interface: content
    target: $SNAP/gpu-2404
    default-provider: mesa-2404
slots:
  gnome-calculator:
    interface: dbus
    bus: session
    name: org.gnome.Calculator
hooks:
  configure:
    command-chain:
    - snap/command-chain/hooks-configure-fonts
    plugs:
    - desktop
layout:
  /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0:
    bind: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0
  /usr/lib/x86_64-linux-gnu/webkit2gtk-4.1:
    bind: $SNAP/gnome-platform/usr/lib/x86_64-linux-gnu/webkit2gtk-4.1
  /usr/share/xml/iso-codes:
    bind: $SNAP/gnome-platform/usr/share/xml/iso-codes
  /usr/share/libdrm:
    bind: $SNAP/gpu-2404/libdrm
  /usr/share/drirc.d:
    symlink: $SNAP/gpu-2404/drirc.d
  /usr/share/X11/XErrorDB:
    symlink: $SNAP/gpu-2404/X11/XErrorDB
