package openssl {
	description = "TLS/SSL and crypto library";
	website = "https://www.openssl.org";
	anitya = 2566;
	// strange malformed tags treated as pre-releases in Anitya
	latest = anityaFallback;

	version# = "4.0.1";
	source = remoteGitHubRelease {
		suffix = "openssl/openssl";
		tag = "openssl-"+version;
		name = "openssl-"+version+".tar.gz";
		checksum = "8FLTB0bZAKyjpmgO4kU5Og-XuSb2_77fxDfEbpOMPKTnIWxQDo7n8e4UdUuc2YIc";
		compress = gzip;
	};

	env = [
		"CC=cc",
	];

	exec = make {
		defaults = false;

		configureName = "/usr/src/openssl/Configure";
		configure = {
			"prefix": "/system";
			"libdir": "lib";
			"openssldir": "etc/ssl";
			"": "no-docs";
		};

		check = [
			"HARNESS_JOBS=" + jobsE,
			"TESTS='-test_bio_dgram'",
			"test",
		];
	};

	inputs = [
		perl,
		coreutils,

		zlib,
		kernel-headers,
	];
}
