···11-{ stdenv, fetchurl, parted, utillinux }:
11+{ stdenv, fetchFromGitHub, parted, utillinux, pkg-config }:
2233stdenv.mkDerivation rec {
4455- version = "1.0.2";
55+ version = "1.1.0";
66 pname = "fatresize";
7788- src = fetchurl {
99- url = "mirror://sourceforge/fatresize/fatresize-${version}.tar.bz2";
1010- sha256 = "04wp48jpdvq4nn0dgbw5za07g842rnxlh9mig4mslz70zqs0izjm";
88+ src = fetchFromGitHub {
99+ owner = "ya-mouse";
1010+ repo = "fatresize";
1111+ rev = "v${version}";
1212+ sha256 = "1vhz84kxfyl0q7mkqn68nvzzly0a4xgzv76m6db0bk7xyczv1qr2";
1113 };
12141315 buildInputs = [ parted utillinux ];
1414-1515- # This patch helps this unmantained piece of software to be built against recent parted
1616- # It basically modifies the detection scheme for parted version (the current one has no micro version defined)
1717- # The second change is to include a header for a moved function since 1.6+ to current 3.1+ parted
1818- # The third change is to modify the call to PED_ASSERT that is no longer defined with 2 params
1919- patches = [ ./fatresize_parted_nix.patch ];
2020-2121- preConfigure = ''
2222- echo "Replacing calls to ped_free with free ..."
2323- substituteInPlace ./fatresize.c --replace ped_free free
2424- '';
2525-2626- # Filesystem resize functions were reintroduced in parted 3.1 due to no other available free alternatives
2727- # but in a sepparate library -> libparted-fs-resize --- that's why the added LDFLAG
2828- makeFlags = [ "LDFLAGS=-lparted-fs-resize" ];
1616+ nativeBuildInputs = [ pkg-config ];
29173018 propagatedBuildInputs = [ parted utillinux ];
31193220 meta = with stdenv.lib; {
3321 description = "The FAT16/FAT32 non-destructive resizer";
3434- homepage = "https://sourceforge.net/projects/fatresize";
2222+ homepage = "https://github.com/ya-mouse/fatresize";
3523 platforms = platforms.linux;
3636- license = licenses.gpl2;
2424+ license = licenses.gpl3;
3725 };
3826}