wcurl: init at 2024.07.10

This commit is contained in:
David Morgan 2024-07-09 08:57:29 +00:00
parent 5fbd57aebc
commit 206d68e865
No known key found for this signature in database
GPG Key ID: C171251002C200F2

View File

@ -0,0 +1,65 @@
{
stdenvNoCC,
lib,
curl,
fetchFromGitLab,
installShellFiles,
nix-update-script,
shunit2,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "wcurl";
version = "2024.07.10";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "debian";
repo = "wcurl";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-FYkG74uoXFNYT7tszDcdCPQCEG3ePOFBUgIUYpsAzb8=";
};
strictDeps = true;
nativeBuildInputs = [ installShellFiles ];
nativeCheckInputs = [ shunit2 ];
doCheck = true;
dontBuild = true;
postPatch = ''
substituteInPlace wcurl \
--replace-fail '"curl "' '"${curl}/bin/curl "'
'';
checkPhase = ''
runHook preCheck
tests/tests.sh
runHook postCheck
'';
installPhase = ''
runHook preInstall
install -D wcurl -t $out/bin
installManPage wcurl.1
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://salsa.debian.org/debian/wcurl";
description = "Simple wrapper around curl to easily download files";
mainProgram = "wcurl";
license = lib.licenses.curl;
maintainers = with lib.maintainers; [ deejayem ];
platforms = lib.platforms.all;
};
})