about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/text/scraper/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/text/scraper/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/text/scraper/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/text/scraper/default.nix b/nixpkgs/pkgs/tools/text/scraper/default.nix
new file mode 100644
index 000000000000..fd8324217f05
--- /dev/null
+++ b/nixpkgs/pkgs/tools/text/scraper/default.nix
@@ -0,0 +1,27 @@
+{ lib, rustPlatform, fetchCrate, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "scraper";
+  version = "0.16.0";
+
+  src = fetchCrate {
+    inherit pname version;
+    hash = "sha256-3FxEfrScOetB1raiT9xjq9G2xLrLZqVlkqbVAFCIhZ0=";
+  };
+
+  cargoHash = "sha256-Pf8+vvOvOHpuJ2v7iwdVzHwneqvhk2E4nbGO4TL/FAM=";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installManPage scraper.1
+  '';
+
+  meta = with lib; {
+    description = "A tool to query HTML files with CSS selectors";
+    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 ];
+  };
+}