2022-12-02 08:20:57 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-05-28 09:39:13 +00:00
|
|
|
pname = "ursadb";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "1.5.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CERT-Polska";
|
|
|
|
repo = "ursadb";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-JssL1Yd+2CPy9fDPJnstiRucdy6TyUdb0Q6xa160CLM=";
|
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeLists.txt \
|
2022-12-02 08:20:57 +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-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +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-30 08:33:03 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2022-12-02 08:20:57 +00:00
|
|
|
})
|