nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 cmake,
7 llvmPackages,
8 z3,
9 python3,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "simbaplusplus";
14 version = "0-unstable-2024-11-05";
15
16 src = fetchFromGitHub {
17 owner = "pgarba";
18 repo = "SiMBA-";
19 rev = "a030a187df0b650718b2aab18ccebc1f810e18b4";
20 hash = "sha256-h2in203bwfb7ArhoBN0PoWM6DZtxI4jSGQuSTTaBJ7A=";
21 };
22
23 patches = [
24 # CMakeLists: minimum cmake version 3.5
25 (fetchpatch {
26 url = "https://github.com/pgarba/SiMBA-/commit/0d5dcaf0a0e85e342141a9c525cc8a10934c2f9d.patch?full_index=1";
27 hash = "sha256-rL/jzq4eoJI6j1aEK8vg6b2uqGjxN6P+8vsC8oYTxng=";
28 })
29 ];
30
31 postPatch = ''
32 substituteInPlace CMakeLists.txt \
33 --replace-fail ' ''${LLVM_TOOLS_BINARY_DIR}/llvm-config' " ${lib.getDev llvmPackages.libllvm}/bin/llvm-config" \
34 --replace-fail 'set(Z3_INCLUDE_DIRS “/usr/include”)' ""
35 '';
36
37 nativeBuildInputs = [
38 cmake
39 ];
40
41 buildInputs = [
42 llvmPackages.libllvm
43 z3
44 ];
45
46 checkInputs = [
47 python3
48 ];
49
50 doCheck = true;
51
52 meta = {
53 description = "SiMBA++ is a port of MBA Solver SiMBA to C/C++";
54 homepage = "https://github.com/pgarba/SiMBA-";
55 license = lib.licenses.gpl3Only;
56 mainProgram = "SiMBA++";
57 maintainers = with lib.maintainers; [ emilytrau ];
58 platforms = lib.platforms.unix;
59 };
60})