1 { lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libiconv, gettext, xxd }:
3 stdenv.mkDerivation rec {
7 src = fetchFromGitHub {
11 sha256 = "sha256-2gxB0lQixiHOHw8uTetHekaM57fvUd9zOzSxWnvUz/c=";
15 # macOS and FreeBSD build fixes backported from master
16 # TODO: remove on the next release
18 url = "https://github.com/dosfstools/dosfstools/commit/77ffb87e8272760b3bb2dec8f722103b0effb801.patch";
19 sha256 = "sha256-xHxIs3faHK/sK3vAVoG8JcTe4zAV+ZtkozWIIFBvPWI=";
22 url = "https://github.com/dosfstools/dosfstools/commit/2d3125c4a74895eae1f66b93287031d340324524.patch";
23 sha256 = "nlIuRDsNjk23MKZL9cZ05odOfTXvsyQaKcv/xEr4c+U=";
25 # reproducible builds fix backported from master
26 # (respect SOURCE_DATE_EPOCH)
27 # TODO: remove on the next release
29 url = "https://github.com/dosfstools/dosfstools/commit/8da7bc93315cb0c32ad868f17808468b81fa76ec.patch";
30 sha256 = "sha256-Quegj5uYZgACgjSZef6cjrWQ64SToGQxbxyqCdl8C7o=";
34 nativeBuildInputs = [ autoreconfHook pkg-config ]
35 ++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
37 # configure.ac:75: error: required file './config.rpath' not found
38 # https://github.com/dosfstools/dosfstools/blob/master/autogen.sh
40 cp ${gettext}/share/gettext/config.rpath config.rpath
43 configureFlags = [ "--enable-compat-symlinks" ];
45 nativeCheckInputs = [ xxd ];
49 description = "Utilities for creating and checking FAT and VFAT file systems";
50 homepage = "https://github.com/dosfstools/dosfstools";
51 platforms = lib.platforms.unix;
52 license = lib.licenses.gpl3;