2024-11-01 01:07:41 +03:00
|
|
|
{
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildNpmPackage,
|
|
|
|
fetchpatch,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
2024-11-01 06:23:27 +03:00
|
|
|
version = "4.9.96";
|
2024-11-01 01:07:41 +03:00
|
|
|
|
|
|
|
pname = "dark-reader";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-11-01 06:23:27 +03:00
|
|
|
owner = "darkreader";
|
2024-11-01 01:07:41 +03:00
|
|
|
repo = "darkreader";
|
2024-11-01 06:23:27 +03:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-2AYIFVTTMns1u0jKk3XeFuYdC1MfG9aOCMjAfZtlXuI=";
|
2024-11-01 01:07:41 +03:00
|
|
|
};
|
|
|
|
|
2024-11-01 06:23:27 +03:00
|
|
|
npmDepsHash = "sha256-dSuCL8GZXiksqVQ+TypzOdAROn3q30ExaGCJu72GLyY=";
|
2024-11-01 01:07:41 +03:00
|
|
|
|
2024-11-01 06:23:27 +03:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/darkreader/darkreader/pull/12920.diff";
|
|
|
|
hash = "sha256-3r54SliCgxihGXzZDRklB0vB3bk9rc1H31PojAYn2Ic=";
|
|
|
|
})
|
|
|
|
];
|
2024-11-01 01:07:41 +03:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out
|
|
|
|
cp build/release/darkreader-firefox.xpi $out/latest.xpi
|
|
|
|
'';
|
|
|
|
}
|