From d700ea8f215ec598ecd54eb21f5d2176f97f0fc5 Mon Sep 17 00:00:00 2001 From: DarkGuibrine Date: Sun, 24 May 2026 02:26:59 -0300 Subject: [PATCH] Update default.nix --- pkgs/hellium/default.nix | 89 ++++++++-------------------------------- 1 file changed, 18 insertions(+), 71 deletions(-) diff --git a/pkgs/hellium/default.nix b/pkgs/hellium/default.nix index 80d138d..83973cd 100644 --- a/pkgs/hellium/default.nix +++ b/pkgs/hellium/default.nix @@ -1,78 +1,25 @@ +{ lib, pkgs, ... }: { - lib, - pkgs, - ... -}: + helium = pkgs.appimageTools.wrapType2 rec { -let - pname = "helium"; - version = "0.12.4.1"; + pname = "helium"; + version = "0.12.4.1"; - src = pkgs.fetchurl { - url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64.AppImage"; - hash = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0="; - }; + src = pkgs.fetchurl { + url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${pname}-${version}-x86_64.AppImage"; + sha256 = "sha256-OgS8HkLBseFrEhNFJxMwp1bg0gzPdfY1VaySAAp7vq0="; + }; - contents = pkgs.appimageTools.extractType2 { - inherit pname version src; - }; -in -pkgs.appimageTools.wrapType2 { - inherit pname version src; + extraInstallCommands = + let + contents = pkgs.appimageTools.extract { inherit pname version src; }; + in + '' - extraPkgs = - pkgs: with pkgs; [ - gtk3 - nss - nspr - libdrm - mesa - - libx11 - libxcb - libxcomposite - libxdamage - libxext - libxfixes - libxrandr - libxi - libxtst - libxscrnsaver - - atk - at-spi2-atk - cairo - pango - expat - alsa-lib - ]; - - extraInstallCommands = '' - mkdir -p $out/share/applications - mkdir -p $out/share/icons - mkdir -p $out/share/pixmaps - - cp ${contents}/*.desktop \ - $out/share/applications/${pname}.desktop - - desktop_file="$out/share/applications/${pname}.desktop" - - sed -i "s|^Exec=.*|Exec=$out/bin/${pname}|g" "$desktop_file" - - if [ -d "${contents}/usr/share/icons" ]; then - cp -r ${contents}/usr/share/icons/* \ - $out/share/icons/ - fi - - find ${contents} -iname "*.png" -exec cp {} $out/share/pixmaps/${pname}.png \; | head -n 1 - ''; - - meta = with lib; { - description = "Helium Browser"; - homepage = "https://github.com/imputnet/helium"; - changelog = "https://github.com/imputnet/helium/releases"; - license = licenses.bsl11; - platforms = [ "x86_64-linux" ]; - mainProgram = pname; + install -m 444 -D ${contents}/${pname}.desktop -t $out/share/applications + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' + cp -r ${contents}/usr/share/icons $out/share + ''; }; }