diff options
Diffstat (limited to 'pkgs/tools/text/platinum-searcher/default.nix')
-rw-r--r-- | pkgs/tools/text/platinum-searcher/default.nix | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/pkgs/tools/text/platinum-searcher/default.nix b/pkgs/tools/text/platinum-searcher/default.nix index ca89b7dc2d8..4271fe131da 100644 --- a/pkgs/tools/text/platinum-searcher/default.nix +++ b/pkgs/tools/text/platinum-searcher/default.nix @@ -1,20 +1,27 @@ -{ lib, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, fetchpatch }: -buildGoPackage rec { +buildGoModule rec { pname = "the_platinum_searcher"; - version = "2.1.5"; - rev = "v${version}"; - - goPackagePath = "github.com/monochromegane/the_platinum_searcher"; + version = "2.2.0"; src = fetchFromGitHub { - inherit rev; owner = "monochromegane"; repo = "the_platinum_searcher"; - sha256 = "1y7kl3954dimx9hp2bf1vjg1h52hj1v6cm4f5nhrqzwrawp0b6q0"; + rev = "v${version}"; + hash = "sha256-FNHlALFwMbajaHWOehdSFeQmvZSuCZLdqGqLZ7DF+pI="; }; - goDeps = ./deps.nix; + vendorHash = "sha256-GIjPgu0e+duN5MeWcRaF5xUFCkqe2aZJCwGbLUMko08="; + + patches = [ + # Add Go Modules support. See https://github.com/monochromegane/the_platinum_searcher/pull/217. + (fetchpatch { + url = "https://github.com/monochromegane/the_platinum_searcher/pull/217/commits/69064d11c57d5fd5f66ddd95f0e789786183d3c6.patch"; + hash = "sha256-qQ7kZYb2MWSUV6T1frIPT9nMfb20SI7lbG8YhqyQEi8="; + }) + ]; + + ldflags = [ "-s" "-w" ]; meta = with lib; { homepage = "https://github.com/monochromegane/the_platinum_searcher"; |