2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, asciidoc, docbook_xsl, docbook_xml_dtd_45, libxslt, xmlto, pkgconfig, json_c, kmod, which, systemd, utillinux
|
2018-05-30 00:31:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2018-07-11 10:03:32 +01:00
|
|
|
version = "61.2";
|
2018-05-30 00:31:16 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "libndctl-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pmem";
|
|
|
|
repo = "ndctl";
|
|
|
|
rev = "v${version}";
|
2018-07-11 10:03:32 +01:00
|
|
|
sha256 = "0vid78jzhmzh505bpwn8mvlamfhcvl6rlfjc29y4yn7zslpydxl7";
|
2018-05-30 00:31:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "man" "dev" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook asciidoc pkgconfig xmlto docbook_xml_dtd_45 docbook_xsl libxslt
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
json_c kmod systemd utillinux
|
|
|
|
];
|
|
|
|
|
2018-07-06 04:12:46 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "add-missing-include-for-ssize_t.patch";
|
|
|
|
url = "https://github.com/pmem/ndctl/commit/8f1798d14dda367c659b87362edb312739830ddf.patch";
|
|
|
|
sha256 = "1jr5kh087938msl22hgjngbf025n9iplz0czmybfp7lavl73m0pm";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-08-07 13:55:32 +01:00
|
|
|
postPatch = ''
|
|
|
|
patchShebangs test
|
|
|
|
'';
|
|
|
|
|
2018-05-30 00:31:16 +01:00
|
|
|
preAutoreconf = ''
|
|
|
|
substituteInPlace configure.ac --replace "which" "${which}/bin/which"
|
|
|
|
substituteInPlace git-version --replace /bin/bash ${stdenv.shell}
|
|
|
|
substituteInPlace git-version-gen --replace /bin/sh ${stdenv.shell}
|
|
|
|
echo "m4_define([GIT_VERSION], [${version}])" > version.m4;
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel";
|
|
|
|
homepage = https://github.com/pmem/ndctl;
|
|
|
|
license = licenses.lgpl21;
|
|
|
|
maintainers = with maintainers; [];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|