nixpkgs/pkgs/servers/ursadb/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2022-11-24 00:55:58 +01:00
{ lib, stdenv, fetchFromGitHub, cmake }:
2020-04-01 00:54:17 +02:00
2022-11-24 00:55:58 +01:00
stdenv.mkDerivation (finalAttrs: {
pname = "ursadb";
2022-11-24 00:55:58 +01:00
version = "1.5.0";
2020-04-01 00:54:17 +02:00
2021-09-19 15:27:44 +02:00
src = fetchFromGitHub {
owner = "CERT-Polska";
repo = "ursadb";
2022-11-24 00:55:58 +01:00
rev = "v${finalAttrs.version}";
hash = "sha256-JssL1Yd+2CPy9fDPJnstiRucdy6TyUdb0Q6xa160CLM=";
fetchSubmodules = true;
2020-04-01 00:54:17 +02:00
};
postPatch = ''
substituteInPlace CMakeLists.txt \
2022-11-24 00:55:58 +01: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-01 00:54:17 +02:00
'';
nativeBuildInputs = [
cmake
];
meta = with lib; {
2020-04-01 00:54:17 +02: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 23:19:16 +01:00
broken = stdenv.isDarwin;
2020-04-01 00:54:17 +02:00
};
2022-11-24 00:55:58 +01:00
})