name: glances
# Version sementic:
# version+buildXX (00 for beta, 01..99 for stable releases)
# Do not forget to set the source-branch option to master for release (see end of file)
# build00 => glances source-branch should be set to develop
# buildXX => glances source-branch should be set to master
version: '4.5.4+build01'

summary: Glances an Eye on your system. A top/htop alternative.
description: |
  Glances is a cross-platform monitoring tool which aims to present
  a maximum of information in a minimum of space through a curses or
  Web based interface. It can adapt dynamically the displayed information
  depending on the user interface size.

base: core24
grade: stable
confinement: strict
compression: lzo

# # i386 is not compliant with core20 or higher
# platforms:
#   - amd64
#   - arm64
#   - armhf
#   - ppc64el
#   - s390x

apps:
  glances:
    command: bin/glances
    plugs:  # https://snapcraft.io/docs/supported-interfaces
      - hardware-observe
      - home
      - log-observe
      - mount-observe
      - network
      - network-bind
      - network-observe
      - network-setup-observe
      - physical-memory-observe
      - power-control
      - process-control
      - raw-volume
      - removable-media
      - system-observe
      - uio
      - upower-observe
      # Others
      - docker
      - home-glances-config
      - etc-glances-config
      - proc-sys
      - opengl
    environment:
      LANG: C.UTF-8
      LC_ALL: C.UTF-8

plugs:
  docker:
    interface: docker
  home-glances-config:
    interface: personal-files
    read:
      - $HOME/.config/glances/glances.conf
  etc-glances-config:
    interface: system-files
    read:
      - /etc/glances/glances.conf
  proc-sys:
    interface: system-observe

parts:
  glances:
    plugin: python
    source: https://github.com/nicolargo/glances.git
    # For releases, set to master
    # For beta/dev, set to develop
    source-branch: master
    python-requirements:
      - docker-requirements.txt
