From 4ebfc1933563943711e1e4326c964faf30c332be Mon Sep 17 00:00:00 2001 From: Marius Bergmann Date: Mon, 13 Feb 2017 19:36:12 +0100 Subject: [PATCH] keepalived: 1.2.19 -> 1.3.2 --- pkgs/tools/networking/keepalived/default.nix | 38 +++++++++----------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/pkgs/tools/networking/keepalived/default.nix b/pkgs/tools/networking/keepalived/default.nix index c579d12b6bd..1f5a6216e7b 100644 --- a/pkgs/tools/networking/keepalived/default.nix +++ b/pkgs/tools/networking/keepalived/default.nix @@ -1,33 +1,29 @@ -{ stdenv, fetchurl, openssl, net_snmp, libnl }: +{ stdenv, fetchFromGitHub, libnfnetlink, libnl, net_snmp, openssl, pkgconfig }: stdenv.mkDerivation rec { - name = "keepalived-1.2.19"; + name = "keepalived-${version}"; + version = "1.3.2"; - src = fetchurl { - url = "http://keepalived.org/software/${name}.tar.gz"; - sha256 = "0lrq963pxhgh74qmxjyy5hvxdfpm4r50v4vsrp559n0w5irsxyrj"; + src = fetchFromGitHub { + owner = "acassen"; + repo = "keepalived"; + rev = "v${version}"; + sha256 = "1mfw8116b7j8y37l382v154yssm635kbm72f4x8303g5zwg6n6qx"; }; - buildInputs = [ openssl net_snmp libnl ]; + buildInputs = [ + libnfnetlink + libnl + net_snmp + openssl + ]; - postPatch = '' - sed -i 's,$(DESTDIR)/usr/share,$out/share,g' Makefile.in - ''; - - # It doesn't know about the include/libnl directory - NIX_CFLAGS_COMPILE="-I${libnl.dev}/include/libnl3"; - NIX_LDFLAGS="-lnl-3 -lnl-genl-3"; + nativeBuildInputs = [ pkgconfig ]; configureFlags = [ - "--sysconfdir=/etc" - "--localstatedir=/var" - "--enable-snmp" "--enable-sha1" - ]; - - installFlags = [ - "sysconfdir=\${out}/etc" - ]; + "--enable-snmp" + ]; meta = with stdenv.lib; { homepage = http://keepalived.org;