nixpkgs/pkgs/tools/text/scraper/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

29 lines
769 B
Nix

{ lib, rustPlatform, fetchCrate, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "scraper";
version = "0.19.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-HfZ8zyjghTXIyIYS+MaGF5OdMLJv6NIjQswdn/tvQbU=";
};
cargoHash = "sha256-py8VVciNJ36/aSTlTH+Bx36yrh/8AuzB9XNNv/PrFak=";
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installManPage scraper.1
'';
meta = with lib; {
description = "A tool to query HTML files with CSS selectors";
mainProgram = "scraper";
homepage = "https://github.com/causal-agent/scraper";
changelog = "https://github.com/causal-agent/scraper/releases/tag/v${version}";
license = licenses.isc;
maintainers = with maintainers; [ figsoda ];
};
}