Skip to content

Commit fb250e4

Browse files
symcc: init at 1.0-unstable-2024-07-16 (NixOS#351654)
2 parents f63be48 + 92dd7db commit fb250e4

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

pkgs/by-name/sy/symcc/package.nix

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
stdenv,
3+
lib,
4+
fetchFromGitHub,
5+
cmake,
6+
ninja,
7+
llvm_17,
8+
clang_17,
9+
z3,
10+
makeWrapper,
11+
}:
12+
13+
stdenv.mkDerivation {
14+
pname = "symcc";
15+
version = "1.0-unstable-2024-07-16";
16+
17+
src = fetchFromGitHub {
18+
owner = "eurecom-s3";
19+
repo = "symcc";
20+
rev = "65a3633992318ded8939629eda54022932fd582d";
21+
hash = "sha256-WzZLeq+if7FyQKkSMDiqxnjtbb7eg8EVuNkCwxyEryM=";
22+
fetchSubmodules = true;
23+
};
24+
25+
cmakeFlags = [
26+
"-DZ3_TRUST_SYSTEM_VERSION=on"
27+
"-DSYMCC_RT_BACKEND=qsym"
28+
];
29+
30+
postPatch = ''
31+
echo 'install(TARGETS SymCC LIBRARY DESTINATION '\$'{CMAKE_INSTALL_LIBDIR})' >> CMakeLists.txt
32+
'';
33+
34+
postInstall = ''
35+
cp SymCCRuntime-prefix/src/SymCCRuntime-build/libsymcc-rt.{a,so} $out/lib/
36+
37+
install -Dm755 symcc sym++ -t $out/bin
38+
39+
wrapProgram $out/bin/symcc \
40+
--set SYMCC_RUNTIME_DIR $out/lib \
41+
--set SYMCC_PASS_DIR $out/lib
42+
43+
wrapProgram $out/bin/sym++ \
44+
--set SYMCC_RUNTIME_DIR $out/lib \
45+
--set SYMCC_PASS_DIR $out/lib
46+
'';
47+
48+
nativeBuildInputs = [
49+
cmake
50+
ninja
51+
llvm_17
52+
clang_17
53+
makeWrapper
54+
];
55+
56+
buildInputs = [
57+
llvm_17
58+
z3
59+
];
60+
61+
meta = {
62+
description = "Efficient compiler-based symbolic execution";
63+
homepage = "https://www.s3.eurecom.fr/tools/symbolic_execution/symcc.html";
64+
license = lib.licenses.gpl3Plus;
65+
maintainers = [ lib.maintainers.dump_stack ];
66+
platforms = lib.platforms.linux;
67+
mainProgram = "symcc";
68+
};
69+
}

0 commit comments

Comments
 (0)