Skip to content

Commit

Permalink
Merge pull request #189672 from zseri/libzbc
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Oct 3, 2022
2 parents 4bd5d43 + fc653b0 commit a0196c7
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 0 deletions.
63 changes: 63 additions & 0 deletions pkgs/os-specific/linux/libnvme/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{ fetchFromGitHub
, json_c
, lib
, libuuid
, meson
, ninja
, openssl
, perl
, pkg-config
, python3
, stdenv
, systemd
}:

stdenv.mkDerivation rec {
pname = "libnvme";
version = "1.1";

outputs = [ "out" "man" ];

src = fetchFromGitHub {
owner = "linux-nvme";
repo = "libnvme";
rev = "v${version}";
sha256 = "EPAPWY6/Bh8I1eLslKJAofLn0IAizmGn00Q5PJPtdRw=";
};

postPatch = ''
patchShebangs meson-vcs-tag.sh
chmod +x doc/kernel-doc-check
patchShebangs doc/kernel-doc doc/kernel-doc-check doc/list-man-pages.sh
'';

nativeBuildInputs = [
meson
ninja
perl # for kernel-doc
pkg-config
];

buildInputs = [
json_c
libuuid
openssl
python3
systemd
];

mesonFlags = [
"-Ddocs=man"
"-Ddocs-build=true"
];

doCheck = true;

meta = with lib; {
description = "C Library for NVM Express on Linux";
homepage = "https://github.com/linux-nvme/libnvme";
maintainers = with maintainers; [ zseri ];
license = with licenses; [ lgpl21Plus ];
platforms = platforms.linux;
};
}
40 changes: 40 additions & 0 deletions pkgs/os-specific/linux/libzbc/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib
, stdenv
, autoconf-archive
, autoreconfHook
, fetchFromGitHub
, gtk3
, libtool
, pkg-config
, guiSupport ? false
}:

stdenv.mkDerivation rec {
pname = "libzbc";
version = "5.12.0";

src = fetchFromGitHub {
owner = "westerndigitalcorporation";
repo = "libzbc";
rev = "v${version}";
sha256 = "qI09dkMCwMym3j1ELrFDNbNB5hW/CzwmFmZhUNDXsfI=";
};

nativeBuildInputs = [
autoconf-archive # this can be removed with the next release
autoreconfHook
libtool
] ++ lib.optionals guiSupport [ pkg-config ];

buildInputs = lib.optionals guiSupport [ gtk3 ];

configureFlags = lib.optional guiSupport "--enable-gui";

meta = with lib; {
description = "ZBC device manipulation library";
homepage = "https://github.com/westerndigitalcorporation/libzbc";
maintainers = with maintainers; [ zseri ];
license = with licenses; [ bsd2 lgpl3Plus ];
platforms = platforms.linux;
};
}
40 changes: 40 additions & 0 deletions pkgs/os-specific/linux/libzbd/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib
, stdenv
, autoconf-archive
, autoreconfHook
, fetchFromGitHub
, gtk3
, libtool
, pkg-config
, guiSupport ? false
}:

stdenv.mkDerivation rec {
pname = "libzbd";
version = "2.0.3";

src = fetchFromGitHub {
owner = "westerndigitalcorporation";
repo = "libzbd";
rev = "v${version}";
sha256 = "GoCHwuR4ylyaN/FskIqKyAPe2A2O3iFVcI3UxPlqvtk=";
};

nativeBuildInputs = [
autoconf-archive # this can be removed with the next release
autoreconfHook
libtool
] ++ lib.optionals guiSupport [ pkg-config ];

buildInputs = lib.optionals guiSupport [ gtk3 ];

configureFlags = lib.optional guiSupport "--enable-gui";

meta = with lib; {
description = "Zoned block device manipulation library and tools";
homepage = "https://github.com/westerndigitalcorporation/libzbd";
maintainers = with maintainers; [ zseri ];
license = with licenses; [ lgpl3Plus gpl3Plus ];
platforms = platforms.linux;
};
}
6 changes: 6 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4308,8 +4308,14 @@ with pkgs;

libnss-mysql = callPackage ../os-specific/linux/libnss-mysql { };

libnvme = callPackage ../os-specific/linux/libnvme { };

libxnd = callPackage ../development/libraries/libxnd { };

libzbc = callPackage ../os-specific/linux/libzbc { };

libzbd = callPackage ../os-specific/linux/libzbd { };

lifeograph = callPackage ../applications/editors/lifeograph { };

limitcpu = callPackage ../tools/misc/limitcpu { };
Expand Down

0 comments on commit a0196c7

Please sign in to comment.