2022-05-09 16:54:01 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libiconv, gettext, xxd }:
|
2009-02-08 16:28:12 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "dosfstools";
|
2022-03-17 19:22:35 +00:00
|
|
|
version = "4.2";
|
2010-08-06 19:49:16 +01:00
|
|
|
|
2016-05-12 09:23:13 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dosfstools";
|
|
|
|
repo = "dosfstools";
|
|
|
|
rev = "v${version}";
|
2022-03-17 19:22:35 +00:00
|
|
|
sha256 = "sha256-2gxB0lQixiHOHw8uTetHekaM57fvUd9zOzSxWnvUz/c=";
|
2010-08-06 19:49:16 +01:00
|
|
|
};
|
|
|
|
|
2022-05-09 16:54:01 +01:00
|
|
|
patches = [
|
|
|
|
# macOS build fixes backported from master
|
|
|
|
# TODO: remove on the next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/dosfstools/dosfstools/commit/77ffb87e8272760b3bb2dec8f722103b0effb801.patch";
|
|
|
|
sha256 = "sha256-xHxIs3faHK/sK3vAVoG8JcTe4zAV+ZtkozWIIFBvPWI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ]
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optional stdenv.isDarwin libiconv;
|
2010-08-06 19:49:16 +01:00
|
|
|
|
2022-03-17 19:22:35 +00:00
|
|
|
# configure.ac:75: error: required file './config.rpath' not found
|
|
|
|
# https://github.com/dosfstools/dosfstools/blob/master/autogen.sh
|
|
|
|
postPatch = ''
|
|
|
|
cp ${gettext}/share/gettext/config.rpath config.rpath
|
|
|
|
'';
|
|
|
|
|
2017-04-11 02:45:33 +01:00
|
|
|
configureFlags = [ "--enable-compat-symlinks" ];
|
|
|
|
|
2022-03-17 19:22:35 +00:00
|
|
|
checkInputs = [ xxd ];
|
|
|
|
doCheck = true;
|
|
|
|
|
2016-05-12 09:23:13 +01:00
|
|
|
meta = {
|
2010-08-06 19:49:16 +01:00
|
|
|
description = "Utilities for creating and checking FAT and VFAT file systems";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/dosfstools/dosfstools";
|
2021-01-15 13:21:58 +00:00
|
|
|
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.gpl3;
|
2010-08-06 19:49:16 +01:00
|
|
|
};
|
2009-02-08 16:28:12 +00:00
|
|
|
}
|