mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 22:50:49 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, m4, yacc }:
|
|
|
|
let
|
|
openbsd_version =
|
|
"OPENBSD_6_8"; # This has to be equal to ${src}/OPENBSD_BRANCH
|
|
openbsd = fetchFromGitHub {
|
|
name = "portable";
|
|
owner = "openbgpd-portable";
|
|
repo = "openbgpd-openbsd";
|
|
rev = openbsd_version;
|
|
sha256 = "sha256-vCVK5k4g6aW2z2fg7Kv0uvkX7f34aRc8K2myb3jjl6w=";
|
|
};
|
|
in stdenv.mkDerivation rec {
|
|
pname = "opengpd";
|
|
version = "6.8p0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "openbgpd-portable";
|
|
repo = "openbgpd-portable";
|
|
rev = version;
|
|
sha256 = "sha256-TKs6tt/SCWes6kYAGIrSShZgOLf7xKh26xG3Zk7wCCw=";
|
|
};
|
|
|
|
nativeBuildInputs = [ autoconf automake libtool m4 yacc ];
|
|
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
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";
|
|
license = licenses.isc;
|
|
homepage = "http://www.openbgpd.org/";
|
|
maintainers = with maintainers; [ kloenk ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|