2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, gtk-doc
|
|
|
|
, docbook_xml_dtd_43
|
|
|
|
, python3
|
|
|
|
, gobject-introspection
|
|
|
|
, glib
|
|
|
|
, udev
|
|
|
|
, kmod
|
|
|
|
, parted
|
|
|
|
, cryptsetup
|
|
|
|
, lvm2
|
|
|
|
, util-linux
|
|
|
|
, libbytesize
|
|
|
|
, libndctl
|
|
|
|
, nss
|
|
|
|
, volume_key
|
|
|
|
, libxslt
|
|
|
|
, docbook_xsl
|
|
|
|
, gptfdisk
|
|
|
|
, libyaml
|
|
|
|
, autoconf-archive
|
|
|
|
, thin-provisioning-tools
|
|
|
|
, makeBinaryWrapper
|
|
|
|
, e2fsprogs
|
|
|
|
, libnvme
|
|
|
|
, keyutils
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2023-08-04 22:07:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "libblockdev";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.1.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "storaged-project";
|
|
|
|
repo = "libblockdev";
|
2023-08-04 22:07:22 +00:00
|
|
|
rev = "${finalAttrs.version}-1";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-WCMedMkaMMhZbB3iJu3c+CTT3AvOjzOSYP45J+NQEDQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "devdoc" ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs scripts
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2023-08-04 22:07:22 +00:00
|
|
|
autoconf-archive
|
|
|
|
autoreconfHook
|
|
|
|
docbook_xsl
|
|
|
|
docbook_xml_dtd_43
|
|
|
|
gobject-introspection
|
|
|
|
gtk-doc
|
|
|
|
libxslt
|
|
|
|
makeBinaryWrapper
|
|
|
|
pkg-config
|
|
|
|
python3
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-08-04 22:07:22 +00:00
|
|
|
cryptsetup
|
|
|
|
e2fsprogs
|
|
|
|
glib
|
|
|
|
gptfdisk
|
|
|
|
keyutils
|
|
|
|
kmod
|
|
|
|
libbytesize
|
|
|
|
libndctl
|
|
|
|
libnvme
|
|
|
|
libyaml
|
|
|
|
lvm2
|
|
|
|
nss
|
|
|
|
parted
|
|
|
|
udev
|
|
|
|
util-linux
|
|
|
|
volume_key
|
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
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = {
|
|
|
|
changelog = "https://github.com/storaged-project/libblockdev/raw/${finalAttrs.src.rev}/NEWS.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A library for manipulating block devices";
|
|
|
|
homepage = "http://storaged.org/libblockdev/";
|
2023-08-04 22:07:22 +00:00
|
|
|
license = with lib.licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils
|
|
|
|
maintainers = with lib.maintainers; [ johnazoidberg ];
|
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
})
|