2023-07-15 17:15:38 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gtk-doc
|
2020-04-24 23:36:52 +00:00
|
|
|
, docbook_xml_dtd_43, python3, gobject-introspection, glib, udev, kmod, parted
|
2023-07-15 17:15:38 +00:00
|
|
|
, cryptsetup, lvm2, util-linux, libbytesize, libndctl, nss, volume_key
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxslt, docbook_xsl, gptfdisk, libyaml, autoconf-archive
|
2023-07-15 17:15:38 +00:00
|
|
|
, thin-provisioning-tools, makeWrapper, e2fsprogs, libnvme, keyutils
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libblockdev";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "3.0.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "storaged-project";
|
|
|
|
repo = "libblockdev";
|
|
|
|
rev = "${version}-1";
|
2023-07-15 17:15:38 +00:00
|
|
|
sha256 = "sha256-WnHcRKRxfdSRmOW2K/vn1WQ4iPm0uS0Td0cWXaeo5hk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
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 = [
|
2023-07-15 17:15:38 +00:00
|
|
|
e2fsprogs glib udev keyutils kmod parted gptfdisk cryptsetup lvm2 util-linux libbytesize
|
|
|
|
libndctl libnvme nss volume_key libyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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/";
|
2022-09-30 11:47:45 +00:00
|
|
|
changelog = "https://github.com/storaged-project/libblockdev/raw/${src.rev}/NEWS.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils
|
|
|
|
maintainers = with maintainers; [ johnazoidberg ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|