2021-03-14 18:50:12 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, m4, bison }:
|
2020-07-30 21:57:41 +02:00
|
|
|
|
|
|
|
let
|
2020-10-29 20:45:58 +01:00
|
|
|
openbsd_version =
|
|
|
|
"OPENBSD_6_8"; # This has to be equal to ${src}/OPENBSD_BRANCH
|
2020-07-30 21:57:41 +02:00
|
|
|
openbsd = fetchFromGitHub {
|
2020-10-29 20:45:58 +01:00
|
|
|
name = "portable";
|
2020-07-30 21:57:41 +02:00
|
|
|
owner = "openbgpd-portable";
|
|
|
|
repo = "openbgpd-openbsd";
|
|
|
|
rev = openbsd_version;
|
2020-10-29 20:45:58 +01:00
|
|
|
sha256 = "sha256-vCVK5k4g6aW2z2fg7Kv0uvkX7f34aRc8K2myb3jjl6w=";
|
2020-07-30 21:57:41 +02:00
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "opengpd";
|
2020-10-29 20:45:58 +01:00
|
|
|
version = "6.8p0";
|
2020-07-30 21:57:41 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openbgpd-portable";
|
|
|
|
repo = "openbgpd-portable";
|
|
|
|
rev = version;
|
2020-10-29 20:45:58 +01:00
|
|
|
sha256 = "sha256-TKs6tt/SCWes6kYAGIrSShZgOLf7xKh26xG3Zk7wCCw=";
|
2020-07-30 21:57:41 +02:00
|
|
|
};
|
|
|
|
|
2021-03-14 18:50:12 +01:00
|
|
|
nativeBuildInputs = [ autoconf automake libtool m4 bison ];
|
2020-07-30 21:57:41 +02:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
mkdir ./openbsd
|
|
|
|
cp -r ${openbsd}/* ./openbsd/
|
|
|
|
chmod -R +w ./openbsd
|
|
|
|
openbsd_version=$(cat ./OPENBSD_BRANCH)
|
|
|
|
if [ "$openbsd_version" != "${openbsd_version}" ]; then
|
|
|
|
echo "OPENBSD VERSION does not match"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-10-29 20:45:58 +01:00
|
|
|
description =
|
|
|
|
"A free implementation of the Border Gateway Protocol, Version 4. It allows ordinary machines to be used as routers exchanging routes with other systems speaking the BGP protocol";
|
2020-07-30 21:57:41 +02:00
|
|
|
license = licenses.isc;
|
|
|
|
homepage = "http://www.openbgpd.org/";
|
|
|
|
maintainers = with maintainers; [ kloenk ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|