wip heritrix package

This commit is contained in:
Shelvacu
2025-08-10 13:33:15 -07:00
committed by Shelvacu on fw
parent 8f1dfd462d
commit c477949143

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
}:
let
# list from https://github.com/hsjobeki/nixpkgs/blob/f0efec9cacfa9aef98a3c70fda2753b9825e262f/pkgs/build-support/fetchmavenartifact/default.nix#L9
defaultRepos = [
"https://repo1.maven.org/maven2"
"https://oss.sonatype.org/content/repositories/releases"
"https://oss.sonatype.org/content/repositories/public"
"https://repo.typesafe.com/typesafe/releases"
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "heritrix-bin";
version = "3.10.1";
# https://repo1.maven.org/maven2/org/archive/heritrix/heritrix/3.10.1/heritrix-3.10.1-dist.tar.gz
src = fetchurl rec {
name = "heritrix-${finalAttrs.version}-dist.tar.gz";
urls = map (repo: "${repo}/org/archive/heritrix/heritrix/${finalAttrs.version}/${name}") defaultRepos;
hash = "sha256-4qf2+dgmRgyD58cQB0jiT+y4XZ3+GjRjhADk+bewt7Q=";
};
meta = {
description = "open-source, extensible, archival-quality web crawler project by Internet Archive";
license = lib.licenses.asl20;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode binaryNativeCode ];
};
})