1{ fetchFromGitHub
2, json_c
3, lib
4, meson
5, ninja
6, openssl
7, perl
8, pkg-config
9, python3
10, stdenv
11, systemd
12}:
13
14stdenv.mkDerivation rec {
15 pname = "libnvme";
16 version = "1.2";
17
18 outputs = [ "out" "man" ];
19
20 src = fetchFromGitHub {
21 owner = "linux-nvme";
22 repo = "libnvme";
23 rev = "v${version}";
24 sha256 = "sha256-U9Fj3OcBe32C0PKhI05eF/6jikHAvdyvXH16IY0rWxI=";
25 };
26
27 postPatch = ''
28 patchShebangs meson-vcs-tag.sh
29 chmod +x doc/kernel-doc-check
30 patchShebangs doc/kernel-doc doc/kernel-doc-check doc/list-man-pages.sh
31 '';
32
33 nativeBuildInputs = [
34 meson
35 ninja
36 perl # for kernel-doc
37 pkg-config
38 ];
39
40 buildInputs = [
41 json_c
42 openssl
43 python3
44 systemd
45 ];
46
47 mesonFlags = [
48 "-Ddocs=man"
49 "-Ddocs-build=true"
50 ];
51
52 doCheck = true;
53
54 meta = with lib; {
55 description = "C Library for NVM Express on Linux";
56 homepage = "https://github.com/linux-nvme/libnvme";
57 maintainers = with maintainers; [ zseri ];
58 license = with licenses; [ lgpl21Plus ];
59 platforms = platforms.linux;
60 };
61}