about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libnbd
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-09 18:28:16 +0000
committerAlyssa Ross <hi@alyssa.is>2021-04-12 18:46:15 +0000
commitfd2e737e0678ee7d8081baef05b305146a2c0034 (patch)
treeac3e9b27576a0382335532d126f9a66d486bc638 /nixpkgs/pkgs/development/libraries/libnbd
parentcc207d720b6aa836e256c1ee9842bc739e630a8a (diff)
parent9e377a6ce42dccd9b624ae4ce8f978dc892ba0e2 (diff)
downloadnixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.gz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.bz2
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.lz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.xz
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.tar.zst
nixlib-fd2e737e0678ee7d8081baef05b305146a2c0034.zip
Merge remote-tracking branch 'nixpkgs/nixos-unstable'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libnbd')
-rw-r--r--nixpkgs/pkgs/development/libraries/libnbd/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libnbd/default.nix b/nixpkgs/pkgs/development/libraries/libnbd/default.nix
new file mode 100644
index 000000000000..6afced2d6d17
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libnbd/default.nix
@@ -0,0 +1,61 @@
+{ lib
+, stdenv
+, fetchurl
+, bash-completion
+, pkg-config
+, perl
+, libxml2
+, fuse
+, gnutls
+}:
+
+stdenv.mkDerivation rec {
+  pname = "libnbd";
+  version = "1.7.4";
+
+  src = fetchurl {
+    url = "https://download.libguestfs.org/libnbd/${lib.versions.majorMinor version}-development/${pname}-${version}.tar.gz";
+    sha256 = "0d586c8mbk50hjslq32n70sdp2a7lbsjv9zhky4w6jy950rrdfqh";
+  };
+
+  nativeBuildInputs = [
+    bash-completion
+    pkg-config
+    perl
+  ];
+  buildInputs = [
+    fuse
+    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;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = with platforms; linux;
+  };
+}
+# TODO: NBD URI support apparently is not enabled
+# TODO: package the 1.6-stable version too
+# TODO: git version needs ocaml
+# TODO: bindings for go, ocaml and python
+