2021-09-19 14:27:44 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, zeromq, cppzmq }:
|
2020-03-31 23:54:17 +01:00
|
|
|
|
2021-05-23 16:07:31 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ursadb";
|
2020-03-31 23:54:17 +01:00
|
|
|
version = "1.2.0";
|
|
|
|
|
2021-09-19 14:27:44 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CERT-Polska";
|
|
|
|
repo = "ursadb";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-/EK1CKJ0IR7fkKSpQkONbWcz6uhUoAwK430ljNYsV5U=";
|
2020-03-31 23:54:17 +01:00
|
|
|
};
|
|
|
|
|
2021-10-31 13:14:16 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
|
|
|
--replace \
|
|
|
|
"add_executable(ursadb_test Tests.cpp)" "" \
|
|
|
|
--replace \
|
|
|
|
"target_link_libraries(ursadb_test ursa)" ""
|
|
|
|
'';
|
|
|
|
|
2020-03-31 23:54:17 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ursadb $out/bin/
|
|
|
|
cp ursadb_new $out/bin/
|
|
|
|
cp ursadb_trim $out/bin/
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
zeromq
|
|
|
|
cppzmq
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-31 23:54:17 +01:00
|
|
|
homepage = "https://github.com/CERT-Polska/ursadb";
|
|
|
|
description = "Trigram database written in C++, suited for malware indexing";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ msm ];
|
|
|
|
platforms = platforms.unix;
|
2020-11-27 22:19:16 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-03-31 23:54:17 +01:00
|
|
|
};
|
|
|
|
}
|