diff --git a/pkgs/by-name/cr/crawley/package.nix b/pkgs/by-name/cr/crawley/package.nix new file mode 100644 index 000000000000..3e0f4bc205f0 --- /dev/null +++ b/pkgs/by-name/cr/crawley/package.nix @@ -0,0 +1,37 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +}: + +buildGoModule rec { + pname = "crawley"; + version = "1.7.1"; + + src = fetchFromGitHub { + owner = "s0rg"; + repo = "crawley"; + rev = "v${version}"; + hash = "sha256-IRhi6z2TQZOOw8EZkJ3/VEOBzAlg0DQjq9wSt+/c3ck="; + }; + + nativeBuildInputs = [ installShellFiles ]; + + vendorHash = "sha256-0BUbALCBR9CGwkqz1cUnzF3xjQkkzfdS7JDDTXkGmN4="; + + ldflags = [ "-w" "-s" ]; + + postInstall = '' + installShellCompletion --cmd crawley \ + --bash <(echo "complete -C $out/bin/crawley crawley") \ + --zsh <(echo "complete -o nospace -C $out/bin/crawley crawley") + ''; + + meta = with lib; { + description = "The unix-way web crawler"; + homepage = "https://github.com/s0rg/crawley"; + license = licenses.mit; + maintainers = with maintainers; [ ltstf1re ]; + mainProgram = "crawley"; + }; +}