nixpkgs/pkgs/by-name/cr/crawley/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
869 B
Nix
Raw Normal View History

2023-12-16 10:03:20 +00:00
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "crawley";
2024-01-27 13:03:44 +00:00
version = "1.7.2";
2023-12-16 10:03:20 +00:00
src = fetchFromGitHub {
owner = "s0rg";
repo = "crawley";
rev = "v${version}";
2024-01-27 13:03:44 +00:00
hash = "sha256-hQvmWob5zCM1dh9oIACjIndaus0gYSidrs4QZM5jtEg=";
2023-12-16 10:03:20 +00:00
};
nativeBuildInputs = [ installShellFiles ];
2024-01-27 13:03:44 +00:00
vendorHash = "sha256-u1y70ydfVG/aH1CVKOUDBmtZgTLlXXrQGt3mfGDibzs=";
2023-12-16 10:03:20 +00:00
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";
};
}