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