Dark Reader: Apply a patch instead of building the fork.

This commit is contained in:
Dmitry Voronin 2024-11-01 06:23:27 +03:00
parent 4d561073e3
commit 2b51b48813
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -2,37 +2,28 @@
fetchFromGitHub,
buildNpmPackage,
fetchpatch,
fetchNpmDeps,
...
}:
buildNpmPackage rec {
# version = "4.9.96";
version = "af57bb1370bd449a7b294759bf2ce353f358ace8";
version = "4.9.96";
pname = "dark-reader";
src = fetchFromGitHub {
owner = "nenikitov";
owner = "darkreader";
repo = "darkreader";
# rev = "v${version}";
rev = version;
hash = "sha256-cX/kwG6lOjNTsf6x86jVWmYLvB6qIeK/B0s2aT08oJU=";
rev = "v${version}";
hash = "sha256-2AYIFVTTMns1u0jKk3XeFuYdC1MfG9aOCMjAfZtlXuI=";
};
npmDepsHash = "sha256-+FPYo5ev/ccp28vX6As/KbFtOtf9bQfhA0b1ufHVmTo=";
# npmDepsHash = "sha256-dSuCL8GZXiksqVQ+TypzOdAROn3q30ExaGCJu72GLyY=";
# npmDeps = fetchNpmDeps {
# inherit src;
# name = "${pname}-${version}-npm-deps";
# hash = npmDepsHash;
# };
npmDepsHash = "sha256-dSuCL8GZXiksqVQ+TypzOdAROn3q30ExaGCJu72GLyY=";
# patches = [
# (fetchpatch {
# url = "https://github.com/darkreader/darkreader/pull/12920.patch";
# hash = "sha256-XNYSrccQAAT4nd/uu/cunlq4WfoL7xKqWUUlTBqwuU8=";
# })
# ];
patches = [
(fetchpatch {
url = "https://github.com/darkreader/darkreader/pull/12920.diff";
hash = "sha256-3r54SliCgxihGXzZDRklB0vB3bk9rc1H31PojAYn2Ic=";
})
];
installPhase = ''
mkdir -p $out