package lm_sensors {
	description = "user-space support for hardware monitoring drivers";
	website = "https://hwmon.wiki.kernel.org/lm_sensors";
	anitya = 1831;

	version# = "3-6-2";
	source = remoteGitHub {
		suffix = "lm-sensors/lm-sensors";
		tag = "V"+version;
		checksum = "7JYNutrihe-FP6r3ftf96uFZJJWPfxnBHL0ALSMA-vovaXVRr-sAjlLitw7WWpCI";
	};

	writable = true;
	chmod = true;
	enterSource = true;

	bin = [ "perl" ];
	populateUsrBin = true;
	exec = make {
		inPlace = true;
		skipConfigure = true;

		make = [
			"CC=cc",
			"ETCDIR=/system/etc",
			"PREFIX=/system",
		];

		check = [
			"CC=cc",
			"check",
		];

		install = "make DESTDIR=/work PREFIX=/system install";
	};

	inputs = [
		perl,
		perl-Test-Cmd,

		m4,
		bison,
		flex,
	];
}
