Unverified Commit 46114dbb authored by rnhmjoj's avatar rnhmjoj
Browse files

diod: 1.0.24 -> 1.1.0

parent 4fc9247d
Loading
Loading
Loading
Loading
+20 −7
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  fetchFromGitHub,
  autoreconfHook,
  pkg-config,
  munge,
  lua,
  libcap,
@@ -11,18 +13,24 @@

stdenv.mkDerivation rec {
  pname = "diod";
  version = "1.0.24";
  version = "1.1.0";

  src = fetchurl {
    url = "https://github.com/chaos/diod/releases/download/${version}/${pname}-${version}.tar.gz";
    sha256 = "17wckwfsqj61yixz53nwkc35z66arb1x3napahpi64m7q68jn7gl";
  src = fetchFromGitHub {
    owner = "chaos";
    repo = "diod";
    tag = "v${version}";
    hash = "sha256-Fz+qvgw5ipyAcZlWBGkmSHuGrZ95i5OorLN3dkdsYKU=";
  };

  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
    sed -i configure.ac -e '/git describe/c ${version})'
  '';

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ];

  buildInputs = [
    munge
    lua
@@ -31,6 +39,11 @@ stdenv.mkDerivation rec {
    ncurses
  ];

  configureFlags = [
    "--with-systemdsystemunitdir=$(out)/lib/systemd/system/"
    "--sysconfdir=/etc"
  ];

  meta = {
    description = "I/O forwarding server that implements a variant of the 9P protocol";
    maintainers = with lib.maintainers; [ rnhmjoj ];