···1{ stdenv, fetchurl, parted, utillinux }:
23stdenv.mkDerivation rec {
4-5 version = "1.0.2";
6 name = "fatresize-${version}";
7···9 url = "mirror://sourceforge/fatresize/fatresize-${version}.tar.bz2";
10 sha256 = "04wp48jpdvq4nn0dgbw5za07g842rnxlh9mig4mslz70zqs0izjm";
11 };
12-13 buildInputs = [ parted utillinux ];
14-15 # This patch helps this unmantained piece of software to be built against recent parted
16 # It basically modifies the detection scheme for parted version (the current one has no micro version defined)
17 # The second change is to include a header for a moved function since 1.6+ to current 3.1+ parted
18 # The third change is to modify the call to PED_ASSERT that is no longer defined with 2 params
19 patches = [ ./fatresize_parted_nix.patch ];
20-21 preConfigure = ''
22 echo "Replacing calls to ped_free with free ..."
23 substituteInPlace ./fatresize.c --replace ped_free free
24 '';
25-26 # Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
27 # but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
28 makeFlags = ''
29 LDFLAGS=-lparted-fs-resize
30 '';
31-32 propagatedBuildInputs = [ parted utillinux ];
33-34- meta = {
35 description = "The FAT16/FAT32 non-destructive resizer";
36 homepage = https://sourceforge.net/projects/fatresize;
37- platforms = stdenv.lib.platforms.linux;
038 };
39}
···1{ stdenv, fetchurl, parted, utillinux }:
23stdenv.mkDerivation rec {
4+5 version = "1.0.2";
6 name = "fatresize-${version}";
7···9 url = "mirror://sourceforge/fatresize/fatresize-${version}.tar.bz2";
10 sha256 = "04wp48jpdvq4nn0dgbw5za07g842rnxlh9mig4mslz70zqs0izjm";
11 };
12+13 buildInputs = [ parted utillinux ];
14+15 # This patch helps this unmantained piece of software to be built against recent parted
16 # It basically modifies the detection scheme for parted version (the current one has no micro version defined)
17 # The second change is to include a header for a moved function since 1.6+ to current 3.1+ parted
18 # The third change is to modify the call to PED_ASSERT that is no longer defined with 2 params
19 patches = [ ./fatresize_parted_nix.patch ];
20+21 preConfigure = ''
22 echo "Replacing calls to ped_free with free ..."
23 substituteInPlace ./fatresize.c --replace ped_free free
24 '';
25+26 # Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
27 # but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
28 makeFlags = ''
29 LDFLAGS=-lparted-fs-resize
30 '';
31+32 propagatedBuildInputs = [ parted utillinux ];
33+34+ meta = with stdenv.lib; {
35 description = "The FAT16/FAT32 non-destructive resizer";
36 homepage = https://sourceforge.net/projects/fatresize;
37+ platforms = platforms.linux;
38+ license = licenses.gpl2;
39 };
40}