2019-11-17 00:47:09 +01:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, flex, bison, readline, libssh }:
|
2013-08-31 17:05:24 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
with lib;
|
2013-08-31 17:05:24 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
generic = { version, sha256, enableIPv6 ? false }:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "bird";
|
|
|
|
inherit version;
|
2018-02-11 23:28:00 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
inherit sha256;
|
2019-08-13 23:52:01 +02:00
|
|
|
url = "ftp://bird.network.cz/pub/bird/${pname}-${version}.tar.gz";
|
2018-02-11 23:28:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flex bison ];
|
2019-11-17 00:47:09 +01:00
|
|
|
buildInputs = [ readline libssh ];
|
2018-02-11 23:28:00 +01:00
|
|
|
|
|
|
|
patches = [
|
2018-05-22 22:42:02 +02:00
|
|
|
(./. + "/dont-create-sysconfdir-${builtins.substring 0 1 version}.patch")
|
2019-01-06 14:26:03 +01:00
|
|
|
]
|
|
|
|
++ optional (lib.versionOlder version "2")
|
2018-12-11 12:25:13 +01:00
|
|
|
# https://github.com/BIRD/bird/pull/4
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/BIRD/bird/commit/fca9ab48e3823c734886f47156a92f6b804c16e9.patch";
|
|
|
|
sha256 = "1pnndc3n56lqqcy74ln0w5kn3i9rbzsm2dqiyp1qw7j33dpkln1b";
|
|
|
|
})
|
2019-01-06 14:26:03 +01:00
|
|
|
;
|
2013-08-31 17:05:24 +02:00
|
|
|
|
2018-12-11 12:25:13 +01:00
|
|
|
CPP="${stdenv.cc.targetPrefix}cpp -E";
|
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--localstatedir=/var"
|
|
|
|
] ++ optional enableIPv6 "--enable-ipv6";
|
2013-08-31 17:05:24 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
meta = {
|
|
|
|
description = "BIRD Internet Routing Daemon";
|
|
|
|
homepage = http://bird.network.cz;
|
|
|
|
license = licenses.gpl2Plus;
|
2019-08-20 19:36:05 +02:00
|
|
|
maintainers = with maintainers; [ fpletz globin ];
|
2018-02-11 23:28:00 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
};
|
2015-05-16 23:22:35 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
bird = generic {
|
2019-10-06 10:48:55 +02:00
|
|
|
version = "1.6.8";
|
|
|
|
sha256 = "1ch0pkkhd7axdjlvhprynh9q08x0nm984nvkm1cjb7gm5rfsnqbc";
|
2018-02-11 23:28:00 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bird6 = generic {
|
2019-10-06 10:48:55 +02:00
|
|
|
version = "1.6.8";
|
|
|
|
sha256 = "1ch0pkkhd7axdjlvhprynh9q08x0nm984nvkm1cjb7gm5rfsnqbc";
|
2018-02-11 23:28:00 +01:00
|
|
|
enableIPv6 = true;
|
|
|
|
};
|
2015-05-16 23:22:35 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
bird2 = generic {
|
2019-10-21 07:07:54 +02:00
|
|
|
version = "2.0.7";
|
|
|
|
sha256 = "0rhhbfmfw2d93rvhglv03rdzxsq2disw6s1wm8d6bgdxmrc2n7b3";
|
2013-08-31 17:05:24 +02:00
|
|
|
};
|
|
|
|
}
|