about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/diod/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/diod/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/diod/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/diod/default.nix b/nixpkgs/pkgs/servers/diod/default.nix
new file mode 100644
index 000000000000..9e33a8c7910e
--- /dev/null
+++ b/nixpkgs/pkgs/servers/diod/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, munge, lua,
+  libcap, perl, ncurses
+}:
+
+stdenv.mkDerivation rec {
+  pname = "diod";
+  version = "1.0.24";
+
+  src = fetchurl {
+    url = "https://github.com/chaos/diod/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "17wckwfsqj61yixz53nwkc35z66arb1x3napahpi64m7q68jn7gl";
+  };
+
+  postPatch = ''
+    substituteInPlace diod/xattr.c --replace attr/xattr.h sys/xattr.h
+    sed -i -e '/sys\/types\.h>/a #include <sys/sysmacros.h>' diod/ops.c
+  '';
+
+  buildInputs = [ munge lua libcap perl ncurses ];
+
+  meta = with stdenv.lib; {
+    description = "An I/O forwarding server that implements a variant of the 9P protocol";
+    maintainers = with maintainers; [ rnhmjoj ];
+    platforms   = platforms.linux;
+    license     = licenses.gpl2Plus;
+  };
+}