Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.6 kB view raw
1{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, gtk-doc 2, docbook_xml_dtd_43, python3, gobject-introspection, glib, udev, kmod, parted 3, cryptsetup, lvm2, dmraid, utillinux, libbytesize, libndctl, nss, volume_key 4, libxslt, docbook_xsl, gptfdisk, libyaml, autoconf-archive 5, thin-provisioning-tools, makeWrapper 6}: 7stdenv.mkDerivation rec { 8 pname = "libblockdev"; 9 version = "2.24"; 10 11 src = fetchFromGitHub { 12 owner = "storaged-project"; 13 repo = "libblockdev"; 14 rev = "${version}-1"; 15 sha256 = "1gzwlwdv0jyb3lh2n016limy2ngfdsa05x7jvg9llf2ls672nq89"; 16 }; 17 18 outputs = [ "out" "dev" "devdoc" ]; 19 20 patches = [ 21 (substituteAll { 22 src = ./fix-paths.patch; 23 sgdisk = "${gptfdisk}/bin/sgdisk"; 24 }) 25 ]; 26 27 postPatch = '' 28 patchShebangs scripts 29 ''; 30 31 nativeBuildInputs = [ 32 autoreconfHook pkgconfig gtk-doc libxslt docbook_xsl docbook_xml_dtd_43 33 python3 gobject-introspection autoconf-archive makeWrapper 34 ]; 35 36 buildInputs = [ 37 glib udev kmod parted gptfdisk cryptsetup lvm2 dmraid utillinux libbytesize 38 libndctl nss volume_key libyaml 39 ]; 40 41 postInstall = '' 42 wrapProgram $out/bin/lvm-cache-stats --prefix PATH : \ 43 ${stdenv.lib.makeBinPath [ thin-provisioning-tools ]} 44 ''; 45 46 meta = with stdenv.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 }; 53}