Files
nixpkgs/pkgs/by-name/mt/mtx/package.nix
Clément 588bc1493f mtx: fix build failure
mtx was redefining bool manually, causing the build to fail
2026-04-03 16:10:46 -07:00

40 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mtx";
version = "1.3.12";
src = fetchurl {
url = "mirror://sourceforge/mtx/mtx-stable/${finalAttrs.version}/mtx-${finalAttrs.version}.tar.gz";
sha256 = "0261c5e90b98b6138cd23dadecbc7bc6e2830235145ed2740290e1f35672d843";
};
postPatch = ''
substituteInPlace mtx.h \
--replace-fail \
"typedef enum { false, true } boolean;" \
"typedef bool boolean;"
'';
doCheck = false;
meta = {
description = "Media Changer Tools";
longDescription = ''
The mtx command controls single or multi-drive SCSI media changers such as
tape changers, autoloaders, tape libraries, or optical media jukeboxes. It
can also be used with media changers that use the 'ATTACHED' API, presuming
that they properly report the MChanger bit as required by the SCSI T-10 SMC
specification.
'';
homepage = "https://sourceforge.net/projects/mtx/";
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.redvers ];
platforms = lib.platforms.linux;
};
})