2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, glib, jansson }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
pname = "xnbd";
|
|
|
|
version = "0.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://bitbucket.org/hirofuchi/xnbd/downloads/xnbd-${version}.tgz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "00wkvsa0yaq4mabczcbfpj6rjvp02yahw8vdrq8hgb3wpm80x913";
|
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
sourceRoot = "xnbd-${version}/trunk";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./0001-Fix-build-for-glibc-2.28.patch ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ glib jansson ];
|
|
|
|
|
|
|
|
# do not build docs, it is slow and it fails on Hydra
|
|
|
|
prePatch = ''
|
|
|
|
rm -rf doc
|
|
|
|
substituteInPlace configure.ac --replace "doc/Makefile" ""
|
|
|
|
substituteInPlace Makefile.am --replace "lib doc ." "lib ."
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://bitbucket.org/hirofuchi/xnbd";
|
|
|
|
description = "Yet another NBD (Network Block Device) server program";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl2;
|
2022-07-14 12:49:19 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|