wip: aarch64 widevine for helium
This commit is contained in:
parent
90ef3cfa94
commit
ae47403ed8
8 changed files with 99 additions and 21 deletions
|
|
@ -1,3 +1,7 @@
|
|||
# taken (stolen?) from two places:
|
||||
# https://github.com/fpletz/flake/blob/main/pkgs/by-name/helium-browser.nix
|
||||
# https://github.com/nix-community/nur-combined/blob/main/repos/Ev357/pkgs/helium/default.nix
|
||||
# so shoutout those guys
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
|
|
@ -5,6 +9,7 @@
|
|||
fetchurl,
|
||||
makeDesktopItem,
|
||||
copyDesktopItems,
|
||||
widevine-helium ? null,
|
||||
}:
|
||||
let
|
||||
pname = "helium-browser";
|
||||
|
|
@ -13,7 +18,7 @@ let
|
|||
architectures = {
|
||||
"x86_64-linux" = {
|
||||
arch = "x86_64";
|
||||
hash = lib.fakeHash;
|
||||
hash = "sha256-DlEFuFwx2Qjr9eb6uiSYzM/F3r2hdtkMW5drJyJt/YE=";
|
||||
};
|
||||
"aarch64-linux" = {
|
||||
arch = "arm64";
|
||||
|
|
@ -30,19 +35,24 @@ let
|
|||
inherit hash;
|
||||
};
|
||||
|
||||
appimageContents = appimageTools.extractType2 {
|
||||
inherit pname version src;
|
||||
};
|
||||
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
|
||||
|
||||
mkdir -p "$out/share/applications"
|
||||
mkdir -p "$out/share/lib/helium"
|
||||
cp -r ${appImageContents}/opt/helium/locales "$out/share/lib/helium"
|
||||
cp -r ${appImageContents}/usr/share/* "$out/share"
|
||||
cp "${appImageContents}/helium.desktop" "$out/share/applications/"
|
||||
substituteInPlace $out/share/applications/helium.desktop \
|
||||
--replace-fail 'Exec=AppRun' 'Exec=${pname}' \
|
||||
--replace-fail 'Icon=helium' 'Icon=web-browser'
|
||||
--replace-fail 'Exec=AppRun' 'Exec=${pname} \
|
||||
--replace-fail 'Icon=helium' 'Icon=web-browser
|
||||
|
||||
${lib.optionalString (stdenv.hostPlatform.system == "aarch64-linux") ''
|
||||
cp -r ${widevine-helium}/share/helium/WidevineCdm "$out/share/lib/helium/"
|
||||
''}
|
||||
'';
|
||||
meta = {
|
||||
description = "A private, respectful browser";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue