about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libblockdev
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libblockdev')
-rw-r--r--nixpkgs/pkgs/development/libraries/libblockdev/default.nix94
1 files changed, 94 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libblockdev/default.nix b/nixpkgs/pkgs/development/libraries/libblockdev/default.nix
new file mode 100644
index 000000000000..985151494364
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libblockdev/default.nix
@@ -0,0 +1,94 @@
+{ 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
+}:
+stdenv.mkDerivation (finalAttrs: {
+  pname = "libblockdev";
+  version = "3.0.2";
+
+  src = fetchFromGitHub {
+    owner = "storaged-project";
+    repo = "libblockdev";
+    rev = "${finalAttrs.version}-1";
+    hash = "sha256-tqF96yeBPilF0zQ53RNN7IZ2wVgWQOwbGkvoywN/i+0=";
+  };
+
+  outputs = [ "out" "dev" "devdoc" ];
+
+  postPatch = ''
+    patchShebangs scripts
+  '';
+
+  nativeBuildInputs = [
+    autoconf-archive
+    autoreconfHook
+    docbook_xsl
+    docbook_xml_dtd_43
+    gobject-introspection
+    gtk-doc
+    libxslt
+    makeBinaryWrapper
+    pkg-config
+    python3
+  ];
+
+  buildInputs = [
+    cryptsetup
+    e2fsprogs
+    glib
+    gptfdisk
+    keyutils
+    kmod
+    libbytesize
+    libndctl
+    libnvme
+    libyaml
+    lvm2
+    nss
+    parted
+    udev
+    util-linux
+    volume_key
+  ];
+
+  postInstall = ''
+    wrapProgram $out/bin/lvm-cache-stats --prefix PATH : \
+      ${lib.makeBinPath [ thin-provisioning-tools ]}
+  '';
+
+  meta = {
+    changelog = "https://github.com/storaged-project/libblockdev/raw/${finalAttrs.src.rev}/NEWS.rst";
+    description = "A library for manipulating block devices";
+    homepage = "http://storaged.org/libblockdev/";
+    license = with lib.licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils
+    maintainers = with lib.maintainers; [ johnazoidberg ];
+    platforms = lib.platforms.linux;
+  };
+})