linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / libraries / libblockdev / default.nix
blob584ea93293ef455eb512cb40cfa394b8bdb2d991
1 { lib, stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkg-config, gtk-doc
2 , docbook_xml_dtd_43, python3, gobject-introspection, glib, udev, kmod, parted
3 , cryptsetup, lvm2, dmraid, util-linux, libbytesize, libndctl, nss, volume_key
4 , libxslt, docbook_xsl, gptfdisk, libyaml, autoconf-archive
5 , thin-provisioning-tools, makeWrapper
6 }:
7 stdenv.mkDerivation rec {
8   pname = "libblockdev";
9   version = "2.25";
11   src = fetchFromGitHub {
12     owner = "storaged-project";
13     repo = "libblockdev";
14     rev = "${version}-1";
15     sha256 = "sha256-eHUHTogKoNrnwwSo6JaI7NMxVt9JeMqfWyhR62bDMuQ=";
16   };
18   outputs = [ "out" "dev" "devdoc" ];
20   patches = [
21     (substituteAll {
22       src = ./fix-paths.patch;
23       sgdisk = "${gptfdisk}/bin/sgdisk";
24     })
25   ];
27   postPatch = ''
28     patchShebangs scripts
29   '';
31   nativeBuildInputs = [
32     autoreconfHook pkg-config gtk-doc libxslt docbook_xsl docbook_xml_dtd_43
33     python3 gobject-introspection autoconf-archive makeWrapper
34   ];
36   buildInputs = [
37     glib udev kmod parted gptfdisk cryptsetup lvm2 dmraid util-linux libbytesize
38     libndctl nss volume_key libyaml
39   ];
41   postInstall = ''
42     wrapProgram $out/bin/lvm-cache-stats --prefix PATH : \
43       ${lib.makeBinPath [ thin-provisioning-tools ]}
44   '';
46   meta = with lib; {
47     description = "A library for manipulating block devices";
48     homepage = "http://storaged.org/libblockdev/";
49     license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils
50     maintainers = with maintainers; [ johnazoidberg ];
51     platforms = platforms.linux;
52   };