3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libtins/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

{ boost, cmake, fetchFromGitHub, gtest, libpcap, openssl, lib, stdenv }:
2018-03-16 18:47:05 +00:00
stdenv.mkDerivation rec {
2019-05-26 16:10:17 +01:00
pname = "libtins";
2020-11-03 04:24:59 +00:00
version = "4.3";
2019-05-26 16:10:17 +01:00
2018-03-16 18:47:05 +00:00
src = fetchFromGitHub {
owner = "mfontanini";
2019-05-26 16:10:17 +01:00
repo = pname;
2018-03-16 18:47:05 +00:00
rev = "v${version}";
2020-11-03 04:24:59 +00:00
sha256 = "09ah1a7ska7xiki7625mn1d8i96il3hxbkc39ba8fn1a5383kmqa";
2018-03-16 18:47:05 +00:00
};
postPatch = ''
rm -rf googletest
cp -r ${gtest.src}/googletest googletest
chmod -R a+w googletest
'';
nativeBuildInputs = [ cmake gtest ];
buildInputs = [
openssl
libpcap
boost
];
configureFlags = [
"--with-boost-libdir=${boost.out}/lib"
"--with-boost=${boost.dev}"
];
doCheck = true;
2019-04-23 04:43:00 +01:00
preCheck = ''
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD${placeholder "out"}/lib
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH''${DYLD_LIBRARY_PATH:+:}$PWD${placeholder "out"}/lib
2019-04-23 04:43:00 +01:00
'';
checkTarget = "tests test";
2018-03-16 18:47:05 +00:00
meta = with lib; {
2018-03-16 18:47:05 +00:00
description = "High-level, multiplatform C++ network packet sniffing and crafting library";
2019-05-26 16:10:17 +01:00
homepage = "https://libtins.github.io/";
changelog = "https://raw.githubusercontent.com/mfontanini/${pname}/v${version}/CHANGES.md";
license = lib.licenses.bsd2;
2018-03-16 18:47:05 +00:00
maintainers = with maintainers; [ fdns ];
platforms = lib.platforms.unix;
2018-03-16 18:47:05 +00:00
};
}