From 4580a96435e1c563f56c616c89a96751e0dbcf79 Mon Sep 17 00:00:00 2001 From: Sean Kovacs Date: Fri, 19 Dec 2025 13:05:41 -0500 Subject: [PATCH] switch to helium from nur --- home/default.nix | 2 +- packages/helium-browser/package.nix | 138 ------------------ .../helium-browser/widevine-aarch64-linux.nix | 49 ------- packages/helium-browser/widevine-meta.nix | 15 -- .../helium-browser/widevine-x86_64-linux.nix | 44 ------ packages/overlay.nix | 8 - 6 files changed, 1 insertion(+), 255 deletions(-) delete mode 100644 packages/helium-browser/package.nix delete mode 100644 packages/helium-browser/widevine-aarch64-linux.nix delete mode 100644 packages/helium-browser/widevine-meta.nix delete mode 100644 packages/helium-browser/widevine-x86_64-linux.nix diff --git a/home/default.nix b/home/default.nix index 8f57be4..64171a9 100755 --- a/home/default.nix +++ b/home/default.nix @@ -173,7 +173,7 @@ # gui applications input-leap libreoffice-qt-fresh - # helium-browser + nur.repos.forkprince.helium-nightly bitwarden-desktop qbittorrent diff --git a/packages/helium-browser/package.nix b/packages/helium-browser/package.nix deleted file mode 100644 index 6950eed..0000000 --- a/packages/helium-browser/package.nix +++ /dev/null @@ -1,138 +0,0 @@ -{ - stdenv, - lib, - fetchurl, - makeDesktopItem, - copyDesktopItems, - autoPatchelfHook, - makeWrapper, - - helium-widevine, - - # runtime dependencies - xorg, - libGL, - mesa, - cairo, - pango, - systemd, - alsa-lib, - gcc-unwrapped, - qt5, - qt6, - glib, - nspr, - nss, - at-spi2-atk, - at-spi2-core, - cups, - gsettings-desktop-schemas, - gtk3, -}: -let - architectures = { - "x86_64-linux" = { - arch = "x86_64"; - hash = "sha256-DLcJCECE5yWcwZuRwNJs3q+sqrZbTbouGF5bDTIFYWM="; - }; - "aarch64-linux" = { - arch = "arm64"; - hash = "sha256-c4XHvq6H60RfoChyrdADGeazZ0hxt72GoZE4A0bwzNU="; - }; - }; - - platformInfo = - architectures.${stdenv.hostPlatform.system} - or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); - -in -stdenv.mkDerivation rec { - pname = "helium-browser"; - version = "0.6.9.1"; - xzName = "helium-${version}-${platformInfo.arch}_linux"; - - src = fetchurl { - url = "https://github.com/imputnet/helium-linux/releases/download/${version}/${xzName}.tar.xz"; - hash = platformInfo.hash; - }; - - sourceRoot = "."; - - nativeBuildInputs = [ - autoPatchelfHook - makeWrapper - copyDesktopItems - ]; - - buildInputs = [ - xorg.libXext - xorg.libXfixes - xorg.libXrandr - xorg.libxcb - xorg.libXdamage - xorg.libXcomposite - mesa - cairo - pango - systemd - alsa-lib - gcc-unwrapped.lib - qt5.qtbase.out - qt6.qtbase.out - glib - nspr - nss - at-spi2-atk - at-spi2-core - cups - gsettings-desktop-schemas - gtk3 - ]; - - dontWrapQtApps = true; - - unpackPhase = '' - runHook preUnpack - tar xf $src - runHook postUnpack - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out/opt/helium - mv ${xzName}/helium.desktop . - mv ${xzName}/product_logo_256.png . - cp -r ${xzName}/* $out/opt/helium/ - chmod +x $out/opt/helium/chrome-wrapper $out/opt/helium/chrome - - - cp -r ${helium-widevine}/share/helium/WidevineCdm $out/opt/helium/ - - makeWrapper $out/opt/helium/chrome-wrapper $out/bin/helium-browser \ - --chdir $out/opt/helium \ - --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}" \ - --prefix LD_LIBRARY_PATH : "${ - lib.makeLibraryPath [ - libGL - mesa - ] - }" - - install -Dm644 product_logo_256.png $out/share/icons/hicolor/256x256/apps/helium.png - install -Dm644 helium.desktop $out/share/applications/helium.desktop - substituteInPlace $out/share/applications/helium.desktop \ - --replace-fail 'Exec=chromium' "Exec=$out/bin/helium-browser" - substituteInPlace $out/share/applications/helium.desktop \ - --replace-fail 'Icon=helium' 'Icon=web-browser' - - runHook postInstall - ''; - - meta = with lib; { - homepage = "https://helium.computer"; - description = "Helium web browser"; - platforms = platforms.linux; - mainProgram = "helium"; - }; -} diff --git a/packages/helium-browser/widevine-aarch64-linux.nix b/packages/helium-browser/widevine-aarch64-linux.nix deleted file mode 100644 index 1ac999b..0000000 --- a/packages/helium-browser/widevine-aarch64-linux.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - fetchFromGitHub, - squashfsTools, - python3, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "helium-widevine"; - version = "${finalAttrs.lacrosVersion}-${builtins.substring 0 7 finalAttrs.widevineInstaller.rev}"; - lacrosVersion = "120.0.6098.0"; - - widevineInstaller = fetchFromGitHub { - owner = "AsahiLinux"; - repo = "widevine-installer"; - rev = "7a3928fe1342fb07d96f61c2b094e3287588958b"; - sha256 = "sha256-XI1y4pVNpXS+jqFs0KyVMrxcULOJ5rADsgvwfLF6e0Y="; - }; - - src = fetchurl { - url = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/chromeos-lacros-arm64-squash-zstd-${finalAttrs.lacrosVersion}"; - hash = "sha256-OKV8w5da9oZ1oSGbADVPCIkP9Y0MVLaQ3PXS3ZBLFXY="; - }; - - nativeBuildInputs = [ - squashfsTools - python3 - ]; - - unpackPhase = '' - unsquashfs -q $src 'WidevineCdm/*' - python3 $widevineInstaller/widevine_fixup.py squashfs-root/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so libwidevinecdm.so - cp squashfs-root/WidevineCdm/manifest.json . - cp squashfs-root/WidevineCdm/LICENSE LICENSE.txt - ''; - - # Accoring to widevine-installer: "Hack because Chromium hardcodes a check for this right now..." - postInstall = '' - mkdir -p "$out/share/helium/WidevineCdm/_platform_specific/linux_x64" - touch "$out/share/helium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so" - install -vD manifest.json "$out/share/helium/WidevineCdm/manifest.json" - install -vD LICENSE.txt "$out/share/helium/WidevineCdm/License.txt" - install -vD libwidevinecdm.so "$out/share/helium/WidevineCdm/_platform_specific/linux_arm64/libwidevinecdm.so" - ''; - - meta = import ./widevine-meta.nix lib; -}) diff --git a/packages/helium-browser/widevine-meta.nix b/packages/helium-browser/widevine-meta.nix deleted file mode 100644 index 0bd7ee6..0000000 --- a/packages/helium-browser/widevine-meta.nix +++ /dev/null @@ -1,15 +0,0 @@ -lib: { - description = "Widevine CDM"; - homepage = "https://www.widevine.com"; - sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; - license = lib.licenses.unfree; - maintainers = with lib.maintainers; [ - jlamur - bearfm - ]; - platforms = lib.map (name: lib.removeSuffix ".nix" (lib.removePrefix "widevine-" name)) ( - lib.filter (name: name != "meta.nix" && name != "package.nix") ( - builtins.attrNames (builtins.readDir ./.) - ) - ); -} diff --git a/packages/helium-browser/widevine-x86_64-linux.nix b/packages/helium-browser/widevine-x86_64-linux.nix deleted file mode 100644 index 3dce29a..0000000 --- a/packages/helium-browser/widevine-x86_64-linux.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - lib, - stdenv, - fetchurl, - go-crx3, -}: - -let - manifest = builtins.fromJSON (builtins.readFile ./x86_64-manifest.json); -in - -stdenv.mkDerivation (finalAttrs: { - pname = "widevine-cdm"; - version = manifest.version; - - src = fetchurl { - url = manifest.url; - hash = manifest.sri; - }; - - nativeBuildInputs = [ go-crx3 ]; - - unpackPhase = '' - unpackDir="src" - cp "$src" "$unpackDir".crx # go-crx3 doesn't like .crx3 extensions - crx3 unpack "$unpackDir".crx - - cd "$unpackDir" - ''; - - installPhase = '' - runHook preInstall - - install -vD manifest.json $out/share/helium/WidevineCdm/manifest.json - install -vD LICENSE $out/share/helium/WidevineCdm/LICENSE.txt - install -vD _platform_specific/linux_x64/libwidevinecdm.so $out/share/helium/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so - - runHook postInstall - ''; - - passthru.updateScript = ./update-x86_64.py; - - meta = import ./meta.nix lib; -}) diff --git a/packages/overlay.nix b/packages/overlay.nix index 2764a0b..ef23042 100644 --- a/packages/overlay.nix +++ b/packages/overlay.nix @@ -16,14 +16,6 @@ final: prev: { # }) { }; # }; - helium-browser = - let - helium-widevine = prev.callPackage ./helium-browser/widevine-aarch64-linux.nix { }; - in - prev.callPackage ./helium-browser/package.nix { - inherit helium-widevine; - }; - spotify-webapp = prev.callPackage (builtins.path { path = ./spotify/package.nix; }) { }; spotifyd = prev.callPackage (builtins.path { path = ./spotifyd/package.nix; }) { };