2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, bash-completion
|
|
|
|
, pkg-config
|
|
|
|
, perl
|
|
|
|
, libxml2
|
|
|
|
, fuse
|
2022-03-30 09:31:56 +00:00
|
|
|
, fuse3
|
2021-03-09 03:18:52 +00:00
|
|
|
, gnutls
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libnbd";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.18.0";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-03-30 09:31:56 +00:00
|
|
|
url = "https://download.libguestfs.org/libnbd/${lib.versions.majorMinor version}-stable/${pname}-${version}.tar.gz";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-srJyd32eCIthoncvM9JQEKCWEOZxxc3YntaV4Ay8kZ8=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bash-completion
|
|
|
|
pkg-config
|
|
|
|
perl
|
|
|
|
];
|
2021-07-14 22:03:04 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
fuse
|
2022-03-30 09:31:56 +00:00
|
|
|
fuse3
|
2021-03-09 03:18:52 +00:00
|
|
|
gnutls
|
|
|
|
libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [ "bashcompdir=$(out)/share/bash-completion/completions" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.com/nbdkit/libnbd";
|
|
|
|
description = "Network Block Device client library in userspace";
|
|
|
|
longDescription = ''
|
|
|
|
NBD — Network Block Device — is a protocol for accessing Block Devices
|
|
|
|
(hard disks and disk-like things) over a Network. This is the NBD client
|
|
|
|
library in userspace, a simple library for writing NBD clients.
|
|
|
|
|
|
|
|
The key features are:
|
|
|
|
- Synchronous API for ease of use.
|
|
|
|
- Asynchronous API for writing non-blocking, multithreaded clients. You
|
|
|
|
can mix both APIs freely.
|
|
|
|
- High performance.
|
|
|
|
- Minimal dependencies for the basic library.
|
|
|
|
- Well-documented, stable API.
|
|
|
|
- Bindings in several programming languages.
|
|
|
|
- Shell (nbdsh) for command line and scripting.
|
|
|
|
'';
|
|
|
|
license = with licenses; lgpl21Plus;
|
2021-04-12 18:23:04 +00:00
|
|
|
maintainers = with maintainers; [ AndersonTorres humancalico ];
|
2021-03-09 03:18:52 +00:00
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
# TODO: package the 1.6-stable version too
|
|
|
|
# TODO: git version needs ocaml
|
|
|
|
# TODO: bindings for go, ocaml and python
|
|
|
|
|