Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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}: 7stdenv.mkDerivation rec { 8 pname = "libblockdev"; 9 version = "2.28"; 10 11 src = fetchFromGitHub { 12 owner = "storaged-project"; 13 repo = "libblockdev"; 14 rev = "${version}-1"; 15 sha256 = "sha256-6MrM3psLqMcpf4haaEHg3FwrhUDz5h/DeY1w96T0UlE="; 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 pkg-config 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 util-linux libbytesize 38 libndctl nss volume_key libyaml 39 ]; 40 41 postInstall = '' 42 wrapProgram $out/bin/lvm-cache-stats --prefix PATH : \ 43 ${lib.makeBinPath [ thin-provisioning-tools ]} 44 ''; 45 46 meta = with lib; { 47 description = "A library for manipulating block devices"; 48 homepage = "http://storaged.org/libblockdev/"; 49 changelog = "https://github.com/storaged-project/libblockdev/raw/${src.rev}/NEWS.rst"; 50 license = with licenses; [ lgpl2Plus gpl2Plus ]; # lgpl2Plus for the library, gpl2Plus for the utils 51 maintainers = with maintainers; [ johnazoidberg ]; 52 platforms = platforms.linux; 53 }; 54}