3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/filesystems/fatresize/default.nix

39 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, parted, utillinux }:
2015-08-17 19:45:37 +01:00
stdenv.mkDerivation rec {
2018-09-07 21:19:35 +01:00
2015-08-17 19:45:37 +01:00
version = "1.0.2";
pname = "fatresize";
2015-08-17 19:45:37 +01:00
src = fetchurl {
url = "mirror://sourceforge/fatresize/fatresize-${version}.tar.bz2";
sha256 = "04wp48jpdvq4nn0dgbw5za07g842rnxlh9mig4mslz70zqs0izjm";
};
2018-09-07 21:19:35 +01:00
2015-08-17 19:45:37 +01:00
buildInputs = [ parted utillinux ];
2018-09-07 21:19:35 +01:00
2015-08-17 19:45:37 +01:00
# This patch helps this unmantained piece of software to be built against recent parted
# It basically modifies the detection scheme for parted version (the current one has no micro version defined)
# The second change is to include a header for a moved function since 1.6+ to current 3.1+ parted
# The third change is to modify the call to PED_ASSERT that is no longer defined with 2 params
patches = [ ./fatresize_parted_nix.patch ];
2018-09-07 21:19:35 +01:00
2015-08-17 19:45:37 +01:00
preConfigure = ''
echo "Replacing calls to ped_free with free ..."
substituteInPlace ./fatresize.c --replace ped_free free
'';
2018-09-07 21:19:35 +01:00
2015-08-17 19:45:37 +01:00
# Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
# but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
2019-10-28 09:17:49 +00:00
makeFlags = [ "LDFLAGS=-lparted-fs-resize" ];
2018-09-07 21:19:35 +01:00
2015-08-17 19:45:37 +01:00
propagatedBuildInputs = [ parted utillinux ];
2018-09-07 21:19:35 +01:00
meta = with stdenv.lib; {
2015-08-17 19:45:37 +01:00
description = "The FAT16/FAT32 non-destructive resizer";
homepage = "https://sourceforge.net/projects/fatresize";
2018-09-07 21:19:35 +01:00
platforms = platforms.linux;
license = licenses.gpl2;
2015-08-17 19:45:37 +01:00
};
}