2018-02-11 23:28:00 +01:00
|
|
|
{ lib, stdenv, fetchurl, flex, bison, readline }:
|
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 {
|
|
|
|
name = "bird-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
inherit sha256;
|
|
|
|
url = "ftp://bird.network.cz/pub/bird/${name}.tar.gz";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ flex bison ];
|
|
|
|
buildInputs = [ readline ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(./. + (builtins.toPath "/dont-create-sysconfdir-${builtins.substring 0 1 version}.patch"))
|
|
|
|
];
|
2013-08-31 17:05:24 +02:00
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ viric fpletz ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
};
|
2015-05-16 23:22:35 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
bird = generic {
|
|
|
|
version = "1.6.3";
|
|
|
|
sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r";
|
|
|
|
};
|
|
|
|
|
|
|
|
bird6 = generic {
|
|
|
|
version = "1.6.3";
|
|
|
|
sha256 = "0z3yrxqb0p7f8b7r2gk4mvrwfzk45zx7yr9aifbvba1vgksiri9r";
|
|
|
|
enableIPv6 = true;
|
|
|
|
};
|
2015-05-16 23:22:35 +02:00
|
|
|
|
2018-02-11 23:28:00 +01:00
|
|
|
bird2 = generic {
|
|
|
|
version = "2.0.1";
|
|
|
|
sha256 = "0qyh2cxj7hfz90x3fnczjdm3i9g7vr0nc4l4wjkj9qm0646vc52n";
|
2013-08-31 17:05:24 +02:00
|
|
|
};
|
|
|
|
}
|