package util-linux {
	description = "a random collection of Linux utilities";
	website = "https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git";
	anitya = 8179;
	// release candidates confuse Anitya
	latest = anityaFallback;

	version# = "2.42.2";
	source = remoteTar {
		url = "https://www.kernel.org/pub/linux/utils/util-linux/"+
			"v"+join {
				elems = slice {
					elems = split {
						s = version;
						sep = ".";
						n = 3;
					};
					end = 2;
				};
				sep = ".";
			}+"/util-linux-"+version+".tar.gz";
		checksum = "Z4IZapPCKQP37aeWMDhxcvuOCy-IR_aHZvfUEMZ0T7trwC1znZACKH_3ddqXwBCg";
		compress = gzip;
	};

	bin = [ "bash" ];
	exec = make {
		configure = {
			"disable-use-tty-group";
			"disable-makeinstall-setuid";
			"disable-makeinstall-chown";

			"enable-fs-paths-default": join {
				elems = [
					"/system/sbin",
					"/system/sbin/fs.d",
					"/system/sbin/fs",
				];
				sep = ":";
			};

			"disable-su";
			"disable-liblastlog2";
			"disable-pam-lastlog2";
		};

		// check script claims:
		// For development purpose only.
		// Don't execute on production system!
		skipCheck = true;
	};

	inputs = [
		bash,

		ncurses,
		kernel-headers,
	];

	runtime = [ ncurses ];
}
