1{ lib, stdenv, fetchurl, libiconv }:
2
3stdenv.mkDerivation rec {
4 pname = "mtools";
5 version = "4.0.43";
6
7 src = fetchurl {
8 url = "mirror://gnu/mtools/${pname}-${version}.tar.bz2";
9 sha256 = "sha256-VB4XlmXcTicrlgLyB0JDWRoVfaicxHBk2oxYKdvSszk=";
10 };
11
12 patches = lib.optional stdenv.isDarwin ./UNUSED-darwin.patch;
13
14 # fails to find X on darwin
15 configureFlags = lib.optional stdenv.isDarwin "--without-x";
16
17 buildInputs = lib.optional stdenv.isDarwin libiconv;
18
19 doCheck = true;
20
21 passthru = {
22 updateScript = ./update.sh;
23 };
24
25 meta = with lib; {
26 homepage = "https://www.gnu.org/software/mtools/";
27 description = "Utilities to access MS-DOS disks";
28 platforms = platforms.unix;
29 license = licenses.gpl3;
30 };
31}