package curl {
	description = "command line tool and library for transferring data with URLs";
	website = "https://curl.se";
	anitya = 381;

	version# = "8.21.0";
	source = remoteTar {
		url = "https://curl.se/download/curl-"+version+".tar.bz2";
		checksum = "lJSm8bVjS0OmsarEdbvejdQdvXsb7yGarlr6oMtA9FW1EXOga8zZxa1LPtfaq_qX";
		compress = bzip2;
	};

	// remove broken test
	writable = true;
	early = "\nchmod +w tests/data && rm -f tests/data/test459\n";

	exec = make {
		configure = {
			"with-openssl";
			"with-ca-bundle": "/system/etc/ssl/certs/ca-bundle.crt";

			"disable-smb";
		};

		check = [
			"TFLAGS=" + jobsLFlagE,
			"test-nonflaky",
		];
	};

	inputs = [
		perl,
		python,
		pkg-config,
		diffutils,

		libpsl,
		openssl,
	];

	runtime = [
		zlib,
		zstd,
		libpsl,
		openssl,
	];
}
