mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
40 lines
1006 B
Nix
40 lines
1006 B
Nix
{ lib, buildGoModule, fetchFromGitHub, fetchpatch, installShellFiles }:
|
|
|
|
buildGoModule rec {
|
|
pname = "sift";
|
|
version = "0.9.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "svent";
|
|
repo = "sift";
|
|
rev = "v${version}";
|
|
hash = "sha256-IZ4Hwg5NzdSXtrIDNxtkzquuiHQOmLV1HSx8gpwE/i0=";
|
|
};
|
|
|
|
vendorHash = "sha256-y883la4R4jhsS99/ohgBC9SHggybAq9hreda6quG3IY=";
|
|
|
|
patches = [
|
|
# Add Go Modules support
|
|
(fetchpatch {
|
|
url = "https://github.com/svent/sift/commit/b56fb3d0fd914c8a6c08b148e15dd8a07c7d8a5a.patch";
|
|
hash = "sha256-mFCEpkgQ8XDPRQ3yKDZ5qY9tKGSuHs+RnhMeAlx33Ng=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
ldflags = [ "-s" "-w" ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --cmd sift --bash sift-completion.bash
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Fast and powerful alternative to grep";
|
|
mainProgram = "sift";
|
|
homepage = "https://sift-tool.org";
|
|
maintainers = with maintainers; [ viraptor ];
|
|
license = licenses.gpl3;
|
|
};
|
|
}
|