tis-neovim icon

Neovim

Paquet d’installation silencieuse pour Neovim

0.11.4-0

  • package: tis-neovim
  • name: Neovim
  • version: 0.11.4-0
  • categories: Editor text
  • maintainer: WAPT Team,Tranquil IT
  • editor: Thiago de Arruda
  • licence: Apache-2.0 license
  • locale: all
  • target_os: linux
  • impacted_process: neovim,nvim
  • architecture: x64
  • signature_date:
  • size: 10.54 Mo
  • installed_size: 20.48 Ko
  • homepage : https://neovim.io/

package           : tis-neovim
version           : 0.11.4-0
architecture      : x64
section           : base
priority          : optional
name              : Neovim
categories        : Editor text
maintainer        : WAPT Team,Tranquil IT
description       : Neovim is an extensible text editor based on Vim
depends           : 
conflicts         : 
maturity          : PROD
locale            : all
target_os         : linux
min_wapt_version  : 2.3
sources           : https://github.com/neovim/neovim
installed_size    : 20480
impacted_process  : neovim,nvim
description_fr    : Neovim est un éditeur de texte extensible basé sur Vim.
description_pl    : Neovim to rozszerzalny edytor tekstu oparty na Vimie."
description_de    : Neovim ist ein erweiterbarer Texteditor basierend auf Vim."
description_es    : Neovim es un editor de texto extensible basado en Vim."
description_pt    : Neovim é um editor de texto extensível baseado em Vim."
description_it    : Neovim è un editor di testo estensibile basato su Vim."
description_nl    : Neovim is een uitbreidbare teksteditor gebaseerd op Vim."
description_ru    : Neovim - это расширяемый текстовый редактор на основе Vim."
audit_schedule    : 
editor            : Thiago de Arruda
keywords          : editor
licence           : Apache-2.0 license
homepage          : https://neovim.io/
package_uuid      : 9c898adb-b2a0-4a90-9eb0-c39f288c4e23
valid_from        : 
valid_until       : 
forced_install_on : 
changelog         : 
min_os_version    : 
max_os_version    : 
icon_sha256sum    : cb633c7ce6b02da54b5003c11744060484cbfc577e699310c6040bace482b962
signer            : Tranquil IT
signer_fingerprint: 8c5127a75392be9cc9afd0dbae1222a673072c308c14d88ab246e23832e8c6bb
signature_date    : 2025-09-06T02:01:22.000000
signed_attributes : package,version,architecture,section,priority,name,categories,maintainer,description,depends,conflicts,maturity,locale,target_os,min_wapt_version,sources,installed_size,impacted_process,description_fr,description_pl,description_de,description_es,description_pt,description_it,description_nl,description_ru,audit_schedule,editor,keywords,licence,homepage,package_uuid,valid_from,valid_until,forced_install_on,changelog,min_os_version,max_os_version,icon_sha256sum,signer,signer_fingerprint,signature_date,signed_attributes
signature         : K1mZ+2pioJ6YPJo0A8PunCcse3NiL7+H9vnomoNutTtLM3ZBj42M7oTndp3EG+A19tA+7UVA9iVgafdNPmi1qTU+KD6EQvWvIrG2jjniSd426a9tdKikprdQxTfiPD/KHtreVNiXyAwNtWWSq7isTOJm5T0RKni3KnyeaYrcNbJ0mwJ9wtGG7ID35scHz5WjRs5UCShYZS0YMjzsZkloEqmT5uGpnXo7PLAFY1WDgBU//teVLNGOhS4sFehnuyNIkrQS2lEjfUen4+0H/hUgoZ8+x4EwKVZ92scB473w3ly0vo8l7hfOYtYx//UUmmxNz6/Qgi8SxJSdk8mZbqBHnA==

# -*- coding: utf-8 -*-
##################################################
# This file is part of WAPT Enterprise
# All right reserved, (c) Tranquil IT Systems 2024
# For more information please refer to
# https://wapt.tranquil.it/store/licences.html
##################################################
from setuphelpers import *
from iniparse import ConfigParser
import os


def install():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    appimage = glob.glob("*.appimage")[0]
    install_appimage(appimage,install_dir)

def uninstall():
    install_dir = makepath('/','opt',control.package.split('-',1)[1])
    uninstall_appimage(install_dir)

def install_appimage(appimage,install_dir,binaliasname=None):
    run('chmod a+x ./' + appimage)

    if isdir(install_dir):
        uninstall_appimage(install_dir)

    mkdirs(install_dir)

    name_appimage = appimage.split('/')[-1]
    filecopyto(appimage, makepath(install_dir, name_appimage))
    run('"./%s" --appimage-extract' % appimage)
    

    for desktop in glob.glob(makepath('squashfs-root','*.desktop')):
 
        desktop_cp = ConfigParser()
        desktop_cp.optionxform = str
        desktop_file = open(desktop, encoding="utf-8")
        desktop_cp.readfp(desktop_file)
        bin_path = desktop_cp.get('Desktop Entry',"Exec")

        newbin_path = install_dir + '/' + name_appimage
        if ' %' in bin_path:
            newbin_path = newbin_path + ' %' + bin_path.split(' %',1)[1]

        icon_path = desktop_cp.get('Desktop Entry',"Icon")

        srcicon = makepath('squashfs-root',icon_path +'.svg')
        if not isfile(srcicon):
            srcicon = makepath('squashfs-root',icon_path +'.png')

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.svg'))
            if lstglob :
                srcicon=lstglob[0]

        if not isfile(srcicon):
            lstglob = glob.glob(makepath('squashfs-root','*.png'))
            if lstglob :
                srcicon=lstglob[0]
            else:
                srcicon = None

        if srcicon:            
            new_icon = install_dir + '/' + srcicon.split('/')[-1]
            filecopyto(srcicon,new_icon)
            desktop_cp.set('Desktop Entry',"Icon",new_icon) 

        desktop_cp.set('Desktop Entry',"Exec",newbin_path)
       
        with open(desktop, 'w', encoding="utf-8") as f:
            desktop_cp.write(f)

        pathdesk = makepath(install_dir,desktop.split('/')[-1])
        filecopyto(desktop, pathdesk)
        run('chown root:root "%s" ' % pathdesk)

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        run('ln -sf "%s" "/usr/share/applications/%s"' % (f,f.split('/')[-1]))

    if binaliasname :
        run(f"ln -sf {install_dir}/{name_appimage} /usr/bin/{binaliasname}")

    remove_tree('squashfs-root')

def uninstall_appimage(install_dir):

    if not glob.glob(makepath(install_dir,'*.desktop')):
        error('.desktop not found')

    for f in glob.glob(makepath(install_dir,'*.desktop')):
        deskfile = f.split('/')[-1]
        system_desktop = makepath("/","usr","share","applications",deskfile)
        if isfile(system_desktop):
            remove_file(system_desktop)
    remove_tree(install_dir)

# -*- coding: utf-8 -*-
from setuphelpers import *
from setupdevhelpers import *
import json

# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls


def update_package():
    result = False
    proxies = get_proxies()

    if not proxies:
        proxies = get_proxies_from_wapt_console()

    git_repo = "neovim/neovim"
    url_api = "https://api.github.com/repos/%s/releases/latest" % git_repo

    # Getting latest version information from official sources
    print("API used is: %s" % url_api)
    json_load = json.loads(wgets(url_api, proxies=proxies))

    for download in json_load["assets"]:
        if download["name"].endswith('linux-x86_64.appimage') :
            download_url = download["browser_download_url"]
            version = json_load["tag_name"].replace("v", "")
            latest_bin = download["name"]
            break


    for f in glob.glob('*.appimage'):
        if get_version_from_binary(f) < version :
            remove_file(f)
    
        # Downloading latest binaries
    print("Latest %s version is: %s" % (control.name, version))
    print("Download URL is: %s" % download_url)
    if not isfile(latest_bin):
        print("Downloading: %s" % latest_bin)
        wget(download_url, latest_bin, proxies=proxies)
    else:
        print("Binary is present: %s" % latest_bin)


    # Changing version of the package
    if Version(version) > Version(control.get_software_version()):
        print("Software version updated (from: %s to: %s)" % (control.get_software_version(), Version(version)))
        package_updated = True
    else:
        print("Software version up-to-date (%s)" % Version(version))
    control.set_software_version(version)
    control.save_control_to_wapt()

38d056ab130f7bf7c481c12636a4e9959de36561d3dfcbe54c6e3571bc0c1dc3 : WAPT/certificate.crt
e9979b4a2b57b2b042bd893ee768a4ef76f7b1cb80f6a120cf1baabc03fcb323 : WAPT/control
cb633c7ce6b02da54b5003c11744060484cbfc577e699310c6040bace482b962 : WAPT/icon.png
68c2e7e3e41fe9df502c3ceaaa80ae1a2b9d0dcb0d95a3a4361e2ceee948308e : luti.json
79e7e160f9505819a5e12f3d9366be94213f5309fb912ef4ef3af52df3982977 : nvim-linux-x86_64.appimage
8abba965029d56ee50bf932f394a4281ee70a589abbb999807c4b843d72bd724 : setup.py
8fa4b7317fde5db300b56e677feae01175f24dc97a7059ac2a1551d23d5f6d3b : update_package.py