about summary refs log tree commit diff
path: root/pkgs/development/libraries/libnbd
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2021-02-27 23:48:48 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2021-02-28 19:06:26 -0300
commitc6f991fa7e347fe3ae26e0743cee38c9591d78b8 (patch)
tree598bcad685dab081f46695663d71d819df436441 /pkgs/development/libraries/libnbd
parent36126fdbfabe7aa34d4f84d1ee9ac06cd371aada (diff)
libnbd: init at 1.7.2
Diffstat (limited to 'pkgs/development/libraries/libnbd')
-rw-r--r--pkgs/development/libraries/libnbd/default.nix61
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libnbd/default.nix b/pkgs/development/libraries/libnbd/default.nix
new file mode 100644
index 0000000000000..6ad0435a84e04
--- /dev/null
+++ b/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.2";
+
+  src = fetchurl {
+    url = "https://download.libguestfs.org/libnbd/${lib.versions.majorMinor version}-development/${pname}-${version}.tar.gz";
+    hash = "sha256-+xC4wDEeWi3RteF04C/qjMmjM+lmhtrtXZZyM1UUli4=";
+  };
+
+  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
+