1{ lib
2, stdenv
3, autoconf-archive
4, autoreconfHook
5, fetchFromGitHub
6, gtk3
7, libtool
8, pkg-config
9, guiSupport ? false
10}:
11
12stdenv.mkDerivation rec {
13 pname = "libzbd";
14 version = "2.0.4";
15
16 src = fetchFromGitHub {
17 owner = "westerndigitalcorporation";
18 repo = "libzbd";
19 rev = "v${version}";
20 sha256 = "sha256-iMQjOWsgsS+uI8mqoOXHRAV1+SIu1McUAcrsY+/zcu8=";
21 };
22
23 nativeBuildInputs = [
24 autoconf-archive # this can be removed with the next release
25 autoreconfHook
26 libtool
27 ] ++ lib.optionals guiSupport [ pkg-config ];
28
29 buildInputs = lib.optionals guiSupport [ gtk3 ];
30
31 configureFlags = lib.optional guiSupport "--enable-gui";
32
33 meta = with lib; {
34 description = "Zoned block device manipulation library and tools";
35 homepage = "https://github.com/westerndigitalcorporation/libzbd";
36 maintainers = [ maintainers.fogti ];
37 license = with licenses; [ lgpl3Plus gpl3Plus ];
38 platforms = platforms.linux;
39 };
40}