2022-11-20 10:57:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, help2man
|
|
|
|
, libiconv
|
|
|
|
}:
|
2014-12-17 13:54:13 +00:00
|
|
|
|
2015-03-26 22:20:12 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-11 07:18:23 +00:00
|
|
|
version = "1.6.4.625";
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "fatsort";
|
2015-03-26 22:20:12 +00:00
|
|
|
|
2014-12-17 13:54:13 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/fatsort/${pname}-${version}.tar.xz";
|
2021-12-11 07:18:23 +00:00
|
|
|
sha256 = "sha256-mm+JoGQLt4LYL/I6eAyfCuw9++RoLAqO2hV+CBBkLq0=";
|
2014-12-17 13:54:13 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 21:13:57 +00:00
|
|
|
buildInputs = [ help2man libiconv ];
|
2014-12-17 13:54:13 +00:00
|
|
|
|
2022-11-20 10:57:10 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
"LD=${stdenv.cc.targetPrefix}cc"
|
2023-01-20 21:13:57 +00:00
|
|
|
|
|
|
|
"UNAME_O=${stdenv.hostPlatform.uname.system}"
|
|
|
|
"UNAME_S=${stdenv.hostPlatform.uname.system}"
|
2022-11-20 10:57:10 +00:00
|
|
|
];
|
2014-12-17 13:54:13 +00:00
|
|
|
|
2022-11-20 10:57:10 +00:00
|
|
|
# make install target is broken (DESTDIR usage is insane)
|
|
|
|
# it's easier to just skip make and install manually
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
install -D -m 755 ./src/fatsort $out/bin/fatsort
|
|
|
|
install -D -m 644 ./man/fatsort.1 $out/man/man1/fatsort.1
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2020-05-10 19:36:32 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://fatsort.sourceforge.net/";
|
2015-03-28 07:22:26 +00:00
|
|
|
description = "Sorts FAT partition table, for devices that don't do sorting of files";
|
2015-03-26 22:20:12 +00:00
|
|
|
maintainers = [ maintainers.kovirobi ];
|
2023-01-20 19:41:27 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-11-20 10:57:10 +00:00
|
|
|
platforms = platforms.unix;
|
2014-12-17 13:54:13 +00:00
|
|
|
};
|
|
|
|
}
|