Formatting + update
This commit is contained in:
parent
93de64c64e
commit
9c895e9cc0
61 changed files with 2350 additions and 2100 deletions
|
|
@ -4,12 +4,12 @@
|
|||
inputs,
|
||||
...
|
||||
}: let
|
||||
pkgs-master = import inputs.nixpkgs-master {
|
||||
inherit (pkgs) system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
pkgs-master = import inputs.nixpkgs-master {
|
||||
inherit (pkgs) system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in {
|
||||
nixpkgs = {
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(self: super: {
|
||||
widevine-cdm = pkgs-master.widevine-cdm;
|
||||
|
|
@ -23,17 +23,17 @@ nixpkgs = {
|
|||
imports = [
|
||||
#./apple-silicon-support
|
||||
];
|
||||
programs.firefox.policies.Preferences = {
|
||||
"media.gmp-widevinecdm.version" = "system-installed";
|
||||
"media.gmp-widevinecdm.visible" = true;
|
||||
"media.gmp-widevinecdm.enabled" = true;
|
||||
"media.gmp-widevinecdm.autoupdate" = false;
|
||||
"media.eme.enabled" = true;
|
||||
"media.eme.encrypted-media-encryption-scheme.enabled" = true;
|
||||
};
|
||||
programs.firefox.autoConfig = ''
|
||||
// Zhu
|
||||
lockPref("general.useragent.override","Mozilla/5.0 (X11; CrOS aarch64 15236.80.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.125 Safari/537.36");''; #doesn't work. You need to manually add this to about:config
|
||||
programs.firefox.policies.Preferences = {
|
||||
"media.gmp-widevinecdm.version" = "system-installed";
|
||||
"media.gmp-widevinecdm.visible" = true;
|
||||
"media.gmp-widevinecdm.enabled" = true;
|
||||
"media.gmp-widevinecdm.autoupdate" = false;
|
||||
"media.eme.enabled" = true;
|
||||
"media.eme.encrypted-media-encryption-scheme.enabled" = true;
|
||||
};
|
||||
programs.firefox.autoConfig = ''
|
||||
// Zhu
|
||||
lockPref("general.useragent.override","Mozilla/5.0 (X11; CrOS aarch64 15236.80.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.5414.125 Safari/537.36");''; #doesn't work. You need to manually add this to about:config
|
||||
hardware.asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
useExperimentalGPUDriver = true; #deprecated
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.firefox.profiles.default.settings = {
|
||||
"media.gmp-widevinecdm.version" = pkgs.widevinecdm-aarch64.version;
|
||||
"media.gmp-widevinecdm.visible" = true;
|
||||
|
|
@ -12,7 +11,7 @@
|
|||
home.file."firefox-widevinecdm" = {
|
||||
enable = true;
|
||||
target = ".mozilla/firefox/default/gmp-widevinecdm";
|
||||
source = pkgs.runCommandLocal "firefox-widevinecdm" { } ''
|
||||
source = pkgs.runCommandLocal "firefox-widevinecdm" {} ''
|
||||
out=$out/${pkgs.widevinecdm-aarch64.version}
|
||||
mkdir -p $out
|
||||
ln -s ${pkgs.widevinecdm-aarch64}/manifest.json $out/manifest.json
|
||||
|
|
@ -20,5 +19,4 @@
|
|||
'';
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
prev: final:
|
||||
{
|
||||
widevinecdm-aarch64 = import ./widevine.nix {
|
||||
inherit (final) stdenvNoCC fetchFromGitHub fetchurl python3 squashfsTools nspr;
|
||||
};
|
||||
prev: final: {
|
||||
widevinecdm-aarch64 = import ./widevine.nix {
|
||||
inherit (final) stdenvNoCC fetchFromGitHub fetchurl python3 squashfsTools nspr;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, python3
|
||||
, squashfsTools
|
||||
, nspr
|
||||
}:
|
||||
let
|
||||
{
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
python3,
|
||||
squashfsTools,
|
||||
nspr,
|
||||
}: let
|
||||
widevine-installer = fetchFromGitHub {
|
||||
owner = "AsahiLinux";
|
||||
repo = "widevine-installer";
|
||||
|
|
@ -13,31 +13,29 @@ let
|
|||
sha256 = "sha256-XI1y4pVNpXS+jqFs0KyVMrxcULOJ5rADsgvwfLF6e0Y=";
|
||||
};
|
||||
lacros-image = fetchurl {
|
||||
url =
|
||||
let
|
||||
distfiles_base = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles";
|
||||
lacros_name = "chromeos-lacros-arm64-squash-zstd";
|
||||
lacrosVersion = "120.0.6098.0";
|
||||
in
|
||||
"${distfiles_base}/${lacros_name}-${lacrosVersion}";
|
||||
url = let
|
||||
distfiles_base = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles";
|
||||
lacros_name = "chromeos-lacros-arm64-squash-zstd";
|
||||
lacrosVersion = "120.0.6098.0";
|
||||
in "${distfiles_base}/${lacros_name}-${lacrosVersion}";
|
||||
hash = "sha256-OKV8w5da9oZ1oSGbADVPCIkP9Y0MVLaQ3PXS3ZBLFXY=";
|
||||
};
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "widevine";
|
||||
version = "4.10.2662.3";
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "widevine";
|
||||
version = "4.10.2662.3";
|
||||
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
buildInputs = [ python3 squashfsTools ];
|
||||
buildInputs = [python3 squashfsTools];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
unsquashfs -q ${lacros-image} 'WidevineCdm/*'
|
||||
python3 ${widevine-installer}/widevine_fixup.py squashfs-root/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so $out/libwidevinecdm.so
|
||||
mv squashfs-root/WidevineCdm/manifest.json $out/
|
||||
mv squashfs-root/WidevineCdm/LICENSE $out/
|
||||
patchelf --add-rpath ${nspr}/lib $out/libwidevinecdm.so
|
||||
'';
|
||||
}
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
unsquashfs -q ${lacros-image} 'WidevineCdm/*'
|
||||
python3 ${widevine-installer}/widevine_fixup.py squashfs-root/WidevineCdm/_platform_specific/cros_arm64/libwidevinecdm.so $out/libwidevinecdm.so
|
||||
mv squashfs-root/WidevineCdm/manifest.json $out/
|
||||
mv squashfs-root/WidevineCdm/LICENSE $out/
|
||||
patchelf --add-rpath ${nspr}/lib $out/libwidevinecdm.so
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue