1769346191

This commit is contained in:
2026-01-25 15:03:11 +02:00
parent 867b6f3017
commit ead4ca9f64
4 changed files with 74 additions and 186 deletions

75
flake.lock generated
View File

@@ -8,11 +8,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1763308703,
"narHash": "sha256-O9Y+Wer8wOh+N+4kcCK5p/VLrXyX+ktk0/s3HdZvJzk=",
"lastModified": 1767386128,
"narHash": "sha256-BJDu7dIMauO2nYRSL4aI8wDNtEm2KOb7lDKP3hxdrpo=",
"owner": "numtide",
"repo": "blueprint",
"rev": "5a9bba070f801d63e2af3c9ef00b86b212429f4f",
"rev": "0ed984d51a3031065925ab08812a5434f40b93d4",
"type": "github"
},
"original": {
@@ -23,7 +23,7 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
@@ -39,6 +39,27 @@
"type": "github"
}
},
"helium": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1769267506,
"narHash": "sha256-P3fTCv97DfUk7n3k6CCRiY7htypmIX0nZ49VGmtuCYE=",
"owner": "vikingnope",
"repo": "helium-browser-nix-flake",
"rev": "55e98df9fdaf731667d0667f64b9dda0fbbdbe14",
"type": "github"
},
"original": {
"owner": "vikingnope",
"repo": "helium-browser-nix-flake",
"type": "github"
}
},
"ixx": {
"inputs": {
"flake-utils": [
@@ -91,11 +112,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1766651565,
"narHash": "sha256-QEhk0eXgyIqTpJ/ehZKg9IKS7EtlWxF3N7DXy42zPfU=",
"lastModified": 1769018530,
"narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3e2499d5539c16d0d173ba53552a4ff8547f4539",
"rev": "88d3861acdd3d2f0e361767018218e51810df8a1",
"type": "github"
},
"original": {
@@ -130,6 +151,7 @@
"root": {
"inputs": {
"blueprint": "blueprint",
"helium": "helium",
"nix-bwrapper": "nix-bwrapper",
"nixpkgs": "nixpkgs",
"zen-browser": "zen-browser"
@@ -165,6 +187,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@@ -185,6 +222,24 @@
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": [
@@ -192,11 +247,11 @@
]
},
"locked": {
"lastModified": 1766377218,
"narHash": "sha256-y3g3OqPB0tmRjbHJNnJKivSQRtAJR+/9S1xbxBWEatg=",
"lastModified": 1769228180,
"narHash": "sha256-94KY0JNjdd3CcSyKlHPCPswlqmUrWT6+MfOHektsdB8=",
"owner": "youwen5",
"repo": "zen-browser-flake",
"rev": "2f61341b32dd69c07e147188e67e09ba2bb99c33",
"rev": "ef1663c14b7c3c2b84bcf140232534be5a2a0257",
"type": "github"
},
"original": {

View File

@@ -12,6 +12,9 @@
nix-bwrapper.inputs.nuschtosSearch.inputs.nixpkgs.follows = "nixpkgs";
nix-bwrapper.inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
helium.url = "github:vikingnope/helium-browser-nix-flake";
helium.inputs.nixpkgs.follows = "nixpkgs";
zen-browser.url = "github:youwen5/zen-browser-flake";
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
};

View File

@@ -20,11 +20,15 @@
in (pkgs.mkBwrapper (pkgs.lib.attrsets.recursiveUpdate rec {
app = {
inherit addPkgs;
package = perSystem.self.helium-browser;
package = perSystem.helium.helium;
id = "net.imput.Helium" + "_bwrapped";
# runScript = "helium";
env = {
GSETTINGS_BACKEND = "dconf";
# use freedesktop portals (like file picker)
GTK_USE_PORTAL = 1;
QT_QPA_PLATFORMTHEME = "flatpak";
};
};
fhsenv.opts.dieWithParent = false;
@@ -34,6 +38,7 @@ in (pkgs.mkBwrapper (pkgs.lib.attrsets.recursiveUpdate rec {
"org.bluez"
"org.freedesktop.Avahi"
"org.freedesktop.UPower"
"org.freedesktop.portal.Documents"
];
dbus.session.talks = [
# "org.a11y.Bus"

View File

@@ -1,175 +0,0 @@
{
system,
inputs,
...
}: let
pkgs = import inputs.nixpkgs {
inherit system;
# config.allowUnfree = true;
};
version = "0.7.7.1";
srcs = {
x86_64-linux = {
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64_linux.tar.xz";
hash = "sha256-aY9GwIDPTcskm55NluSyxkCHC6drd6BdBaNYZhrzlRE=";
};
aarch64-linux = {
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-arm64_linux.tar.xz";
hash = "sha256-76hJ19/bHzdE1//keGF9imYkMHOy6VHpA56bxEkgwgA=";
};
x86_64-darwin = {
url = "https://github.com/imputnet/helium-macos/releases/download/${version}/helium_${version}_x86_64-macos.dmg";
hash = "sha256-LtxzeBkECRML+q+qtcTljuFoPefuZdk1PIcdDqSGl0Y=";
};
aarch64-darwin = {
url = "https://github.com/imputnet/helium-macos/releases/download/${version}/helium_${version}_arm64-macos.dmg";
hash = "sha256-iFE2OigeG+sDfGKmuqqb6LKUyxhZ2Jcti+jLzeHMLYM=";
};
};
in
pkgs.stdenv.mkDerivation {
pname = "helium";
inherit version;
src = pkgs.fetchurl (srcs.${system} or (throw "Unsupported system: ${system}"));
nativeBuildInputs = with pkgs;
[
makeWrapper
]
++ pkgs.lib.optionals stdenv.isLinux [
autoPatchelfHook
copyDesktopItems
]
++ pkgs.lib.optionals stdenv.isDarwin [
_7zz
];
unpackCmd = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
7zz x $src
'';
buildInputs = with pkgs;
pkgs.lib.optionals stdenv.isLinux [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libGL
xorg.libX11
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
libdrm
libgbm
libpulseaudio
xorg.libxcb
libxkbcommon
mesa
nspr
nss
pango
pipewire
systemd
vulkan-loader
wayland
libxshmfence
libuuid
kdePackages.qtbase
];
autoPatchelfIgnoreMissingDeps = pkgs.lib.optionals pkgs.stdenv.isLinux [
"libQt6Core.so.6"
"libQt6Gui.so.6"
"libQt6Widgets.so.6"
"libQt5Core.so.5"
"libQt5Gui.so.5"
"libQt5Widgets.so.5"
];
dontWrapQtApps = pkgs.stdenv.isLinux;
installPhase =
if pkgs.stdenv.isDarwin
then ''
runHook preInstall
mkdir -p $out/Applications/Helium.app
cp -r . $out/Applications/Helium.app
mkdir -p $out/bin
makeWrapper $out/Applications/Helium.app/Contents/MacOS/Helium $out/bin/helium \
--add-flags "--disable-component-update" \
--add-flags "--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'" \
--add-flags "--check-for-update-interval=0" \
--add-flags "--disable-background-networking"
runHook postInstall
''
else ''
runHook preInstall
mkdir -p $out/bin $out/opt/helium
cp -r * $out/opt/helium
# The binary is named 'chrome' in the tarball
makeWrapper $out/opt/helium/chrome $out/bin/helium \
--prefix LD_LIBRARY_PATH : "${pkgs.lib.makeLibraryPath (with pkgs; [
libGL
libvdpau
libva
pipewire
])}" \
--add-flags "--ozone-platform-hint=auto" \
--add-flags "--enable-features=WaylandWindowDecorations" \
--add-flags "--disable-component-update" \
--add-flags "--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'" \
--add-flags "--check-for-update-interval=0" \
--add-flags "--disable-background-networking"
# Install icon
mkdir -p $out/share/icons/hicolor/256x256/apps
cp $out/opt/helium/product_logo_256.png $out/share/icons/hicolor/256x256/apps/helium.png
runHook postInstall
'';
desktopItems = pkgs.lib.optionals pkgs.stdenv.isLinux [
(pkgs.makeDesktopItem {
name = "helium";
exec = "helium %U";
icon = "helium";
desktopName = "Helium";
genericName = "Web Browser";
categories = ["Network" "WebBrowser"];
terminal = false;
mimeTypes = ["text/html" "text/xml" "application/xhtml+xml" "x-scheme-handler/http" "x-scheme-handler/https"];
})
];
meta = with pkgs.lib; {
description = "Private, fast, and honest web browser based on ungoogled-chromium";
homepage = "https://helium.computer/";
license = licenses.gpl3Only;
platforms = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
mainProgram = "helium";
};
}