From 04cd699d812a1e7d9b57b60083831294e3e06947 Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Wed, 27 Jul 2022 15:37:54 +0200 Subject: [PATCH] genext2fs: 1.4.1 > 1.5.0 Also, enable libarchive support and run the tests --- pkgs/tools/filesystems/genext2fs/default.nix | 30 +++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/filesystems/genext2fs/default.nix b/pkgs/tools/filesystems/genext2fs/default.nix index dc0b902bf32b..ecd77781d39b 100644 --- a/pkgs/tools/filesystems/genext2fs/default.nix +++ b/pkgs/tools/filesystems/genext2fs/default.nix @@ -1,22 +1,32 @@ -{ lib, stdenv, fetchurl }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, libarchive }: stdenv.mkDerivation rec { pname = "genext2fs"; - version = "1.4.1"; + version = "1.5.0"; - src = fetchurl { - url = "mirror://sourceforge/genext2fs/genext2fs-${version}.tar.gz"; - sha256 = "1z7czvsf3ircvz2cw1cf53yifsq29ljxmj15hbgc79l6gbxbnka0"; + src = fetchFromGitHub { + owner = "bestouff"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-9LAU5XuCwwEhU985MzZ2X+YYibvyECULQSn9X2jdj5I="; }; - # https://sourceforge.net/p/genext2fs/bugs/2/ - # Will be fixed in the next release, whenever this happens - postPatch = '' - sed -e 's@4 [*] (EXT2_TIND_BLOCK+1)@-1+&@' -i genext2fs.c + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ + libarchive + ]; + + configureFlags = [ + "--enable-libarchive" + ]; + + doCheck = true; + checkPhase = '' + ./test.sh ''; meta = with lib; { - homepage = "http://genext2fs.sourceforge.net/"; + homepage = "https://github.com/bestouff/genext2fs"; description = "A tool to generate ext2 filesystem images without requiring root privileges"; license = licenses.gpl2; platforms = platforms.all;