2022-11-23 23:55:58 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-03-31 22:54:17 +00:00
|
|
|
|
2022-11-23 23:55:58 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-05-23 15:07:31 +00:00
|
|
|
pname = "ursadb";
|
2022-11-23 23:55:58 +00:00
|
|
|
version = "1.5.0";
|
2020-03-31 22:54:17 +00:00
|
|
|
|
2021-09-19 13:27:44 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CERT-Polska";
|
|
|
|
repo = "ursadb";
|
2022-11-23 23:55:58 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-JssL1Yd+2CPy9fDPJnstiRucdy6TyUdb0Q6xa160CLM=";
|
|
|
|
fetchSubmodules = true;
|
2020-03-31 22:54:17 +00:00
|
|
|
};
|
|
|
|
|
2021-10-31 13:14:16 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
2022-11-23 23:55:58 +00:00
|
|
|
--replace "add_executable(ursadb_test src/Tests.cpp)" "" \
|
|
|
|
--replace "target_link_libraries(ursadb_test ursa)" "" \
|
|
|
|
--replace "target_enable_ipo(ursadb_test)" "" \
|
|
|
|
--replace "target_clangformat_setup(ursadb_test)" "" \
|
|
|
|
--replace 'target_include_directories(ursadb_test PUBLIC ${"$"}{CMAKE_SOURCE_DIR})' "" \
|
|
|
|
--replace "ursadb_test" ""
|
2020-03-31 22:54:17 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-31 22:54:17 +00: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 22:54:17 +00:00
|
|
|
};
|
2022-11-23 23:55:58 +00:00
|
|
|
})
|