fix: remplacer import atomicptr par crab.nix local

Corrige le warning d'évaluation "'system' has been renamed to
stdenv.hostPlatform.system" causé par `system = system` dans la
dérivation crab upstream.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Pierre Martin
2026-03-12 12:35:30 +01:00
parent ad7d56221c
commit b1a8d8cb6d
2 changed files with 45 additions and 3 deletions

43
pkgs/crab.nix Normal file
View File

@@ -0,0 +1,43 @@
# Based on https://github.com/atomicptr/nix/blob/master/pkgs/crab/default.nix
# Fixed: removed deprecated `system = system` from mkDerivation
{
lib,
fetchurl,
installShellFiles,
stdenvNoCC,
}:
let
shaMap = {
x86_64-linux = "18c2mxaf0f01c1905c7ppnq9cq07qr4nn5al9zn9idhzk9b8mf9q";
x86_64-darwin = "10w9xv7z8fw4628pwnw9dj2n3wf3g0lgfcpy3k2f3v6fhv30abwm";
};
urlMap = {
x86_64-linux = "https://github.com/atomicptr/crab/releases/download/v1.4.4/crab_1.4.4_linux_amd64.tar.gz";
x86_64-darwin = "https://github.com/atomicptr/crab/releases/download/v1.4.4/crab_1.4.4_darwin_amd64.tar.gz";
};
system = stdenvNoCC.hostPlatform.system;
in
stdenvNoCC.mkDerivation {
pname = "crab";
version = "1.4.4";
src = fetchurl {
url = urlMap.${system};
sha256 = shaMap.${system};
};
sourceRoot = ".";
nativeBuildInputs = [ installShellFiles ];
installPhase = ''
mkdir -p $out/bin
cp -vr ./crab $out/bin/crab
'';
meta = {
description = "A versatile tool to crawl dozens of URLs from a given source, like a sitemap or an URL list.";
homepage = "https://github.com/atomicptr/crab";
license = lib.licenses.mit;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
platforms = [
"x86_64-darwin"
"x86_64-linux"
];
};
}