2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkg-config, gtk-doc
|
2020-04-24 23:36:52 +00:00
|
|
|
, docbook_xml_dtd_43, python3, gobject-introspection, glib, udev, kmod, parted
|
2020-11-24 20:58:05 +00:00
|
|
|
, cryptsetup, lvm2, dmraid, util-linux, libbytesize, libndctl, nss, volume_key
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxslt, docbook_xsl, gptfdisk, libyaml, autoconf-archive
|
|
|
|
, thin-provisioning-tools, makeWrapper
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libblockdev";
|
2020-06-15 15:56:04 +00:00
|
|
|
version = "2.24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "storaged-project";
|
|
|
|
repo = "libblockdev";
|
|
|
|
rev = "${version}-1";
|
2020-06-15 15:56:04 +00:00
|
|
|
sha256 = "1gzwlwdv0jyb3lh2n016limy2ngfdsa05x7jvg9llf2ls672nq89";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
sgdisk = "${gptfdisk}/bin/sgdisk";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
autoreconfHook pkg-config gtk-doc libxslt docbook_xsl docbook_xml_dtd_43
|
2020-04-24 23:36:52 +00:00
|
|
|
python3 gobject-introspection autoconf-archive makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2020-11-24 20:58:05 +00:00
|
|
|
glib udev kmod parted gptfdisk cryptsetup lvm2 dmraid util-linux libbytesize
|
2020-04-24 23:36:52 +00:00
|
|
|
libndctl nss volume_key libyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lvm-cache-stats --prefix PATH : \
|
2021-02-05 17:12:51 +00:00
|
|
|
${lib.makeBinPath [ thin-provisioning-tools ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A library for manipulating block devices";
|
|
|
|
homepage = "http://storaged.org/libblockdev/";
|
|
|
|
license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils
|
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|