about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/genext2fs/default.nix
blob: cf9cf7ef00e374b563e9f30e5391987903fb47a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenv, fetchFromGitHub, autoreconfHook, libarchive }:

stdenv.mkDerivation rec {
  pname = "genext2fs";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "bestouff";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-9LAU5XuCwwEhU985MzZ2X+YYibvyECULQSn9X2jdj5I=";
  };

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [
    libarchive
  ];

  configureFlags = [
    "--enable-libarchive"
  ];

  doCheck = true;
  checkPhase = ''
    ./test.sh
  '';

  meta = with lib; {
    homepage = "https://github.com/bestouff/genext2fs";
    description = "A tool to generate ext2 filesystem images without requiring root privileges";
    license = licenses.gpl2Only;
    platforms = platforms.all;
    maintainers = [ maintainers.bjornfor ];
    mainProgram = "genext2fs";
  };
}