From 2b51b48813fdd30721d1474ead49c450ccf73ec3 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Fri, 1 Nov 2024 06:23:27 +0300 Subject: [PATCH] Dark Reader: Apply a patch instead of building the fork. --- package/darkreader/default.nix | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/package/darkreader/default.nix b/package/darkreader/default.nix index 1eeb76d..433c8c5 100644 --- a/package/darkreader/default.nix +++ b/package/darkreader/default.nix @@ -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