From 69484fe4943e0e7014f65b2e82e0138c7dbe53b3 Mon Sep 17 00:00:00 2001 From: Sean Kovacs Date: Thu, 13 Nov 2025 10:04:30 -0500 Subject: [PATCH] add helium browser --- flake.nix | 1 + home/all.nix | 1 + packages/helium-browser/overlay.nix | 3 ++ packages/helium-browser/package.nix | 54 +++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+) create mode 100644 packages/helium-browser/overlay.nix create mode 100644 packages/helium-browser/package.nix diff --git a/flake.nix b/flake.nix index 8899e4a..721d8b8 100644 --- a/flake.nix +++ b/flake.nix @@ -65,6 +65,7 @@ nixpkgs.overlays = [ (import ./packages/widevine-firefox/overlay.nix) (import ./packages/strawberry/overlay.nix) + (import ./packages/helium-browser/overlay.nix) ]; } ./hosts/all.nix diff --git a/home/all.nix b/home/all.nix index 8d0e538..beb9238 100755 --- a/home/all.nix +++ b/home/all.nix @@ -26,6 +26,7 @@ libreoffice-qt-fresh spotdl rclone + helium-browser kde-rounded-corners kdePackages.partitionmanager diff --git a/packages/helium-browser/overlay.nix b/packages/helium-browser/overlay.nix new file mode 100644 index 0000000..fbc3dc6 --- /dev/null +++ b/packages/helium-browser/overlay.nix @@ -0,0 +1,3 @@ +final: prev: { + helium-browser = prev.callPackage (builtins.path { path = ./package.nix; }) { }; +} diff --git a/packages/helium-browser/package.nix b/packages/helium-browser/package.nix new file mode 100644 index 0000000..ef8f7df --- /dev/null +++ b/packages/helium-browser/package.nix @@ -0,0 +1,54 @@ +{ + stdenv, + lib, + appimageTools, + fetchurl, + makeDesktopItem, + copyDesktopItems, +}: +let + pname = "helium-browser"; + version = "0.6.4.1"; + + architectures = { + "x86_64-linux" = { + arch = "x86_64"; + hash = lib.fakeHash; + }; + "aarch64-linux" = { + arch = "arm64"; + hash = "sha256-B63tvOtSRlMRJozvzC7lqG2LM0ZgLIq2G/AHABl+Qqg="; + }; + }; + + src = + let + inherit (architectures.${stdenv.hostPlatform.system}) arch hash; + in + fetchurl { + url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-${arch}.AppImage"; + inherit hash; + }; + + appimageContents = appimageTools.extractType2 { + inherit pname version src; + }; +in +appimageTools.wrapType2 { + inherit pname version src; + extraInstallCommands = '' + install -Dm444 ${appimageContents}/helium.desktop -t $out/share/applications + install -Dm444 ${appimageContents}/helium.png -t $out/share/pixmaps + + substituteInPlace $out/share/applications/helium.desktop \ + --replace-fail 'Exec=AppRun' 'Exec=${pname}' + ''; + meta = { + description = "A private, respectful browser"; + homepage = "https://github.com/imputnet/helium-linux"; + downloadPage = "https://github.com/imputnet/helium-linux/releases"; + license = lib.licenses.gpl3Only; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + platforms = lib.attrNames architectures; + }; +}