nixpkgs/pkgs/development/libraries/libtins/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.2 KiB
Nix
Raw Normal View History

{ boost, cmake, fetchFromGitHub, gtest, libpcap, openssl, lib, stdenv }:
2018-03-16 19:47:05 +01:00
stdenv.mkDerivation rec {
2019-05-26 17:10:17 +02:00
pname = "libtins";
2022-02-18 16:38:33 +01:00
version = "4.4";
2019-05-26 17:10:17 +02:00
2018-03-16 19:47:05 +01:00
src = fetchFromGitHub {
owner = "mfontanini";
2019-05-26 17:10:17 +02:00
repo = pname;
2018-03-16 19:47:05 +01:00
rev = "v${version}";
2022-02-18 16:38:33 +01:00
sha256 = "sha256-mXbinXh/CO0SZZ71+K+FozbHCCoi12+AIa2o+P0QmUw=";
2018-03-16 19:47:05 +01:00
};
postPatch = ''
rm -rf googletest
cp -r ${gtest.src} googletest
2018-03-16 19:47:05 +01:00
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 05:43:00 +02: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 05:43:00 +02:00
'';
checkTarget = "tests test";
2018-03-16 19:47:05 +01:00
meta = with lib; {
2018-03-16 19:47:05 +01:00
description = "High-level, multiplatform C++ network packet sniffing and crafting library";
2019-05-26 17:10:17 +02:00
homepage = "https://libtins.github.io/";
changelog = "https://raw.githubusercontent.com/mfontanini/${pname}/v${version}/CHANGES.md";
license = lib.licenses.bsd2;
2018-03-16 19:47:05 +01:00
maintainers = with maintainers; [ fdns ];
platforms = lib.platforms.unix;
2018-03-16 19:47:05 +01:00
};
}