From 9365489d2307441e606dad83179e278c201cf088 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Mon, 3 Jul 2023 19:50:22 +0900 Subject: gnu: Add klee * gnu/packages/klee.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/klee.scm | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 gnu/packages/klee.scm diff --git a/gnu/local.mk b/gnu/local.mk index c603c15d6c..5c1614503f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -370,6 +370,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/kde-systemtools.scm \ %D%/packages/kde-utils.scm \ %D%/packages/kerberos.scm \ + %D%/packages/klee.scm \ %D%/packages/kodi.scm \ %D%/packages/language.scm \ %D%/packages/lean.scm \ diff --git a/gnu/packages/klee.scm b/gnu/packages/klee.scm new file mode 100644 index 0000000000..ea4d4ff439 --- /dev/null +++ b/gnu/packages/klee.scm @@ -0,0 +1,73 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 Nguyễn Gia Phong +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages klee) + #:use-module (guix build-system cmake) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (gnu packages check) + #:use-module (gnu packages cpp) + #:use-module (gnu packages llvm) + #:use-module (gnu packages maths) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages sqlite) + #:use-module (guix licenses)) + +(define-public klee + (package + (name "klee") + (version "3.0") + (source + (origin + (method git-fetch) + (uri (git-reference (url "https://github.com/klee/klee") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0dj20nazkcq84ryr87dihvjznapsbl1n21sa8dhhnb0wsad5d6fb")))) + (build-system cmake-build-system) + (arguments + (list + #:configure-flags + #~(list "-DCMAKE_BUILD_TYPE=Release" + "-DKLEE_RUNTIME_BUILD_TYPE=Release" + (string-append "-DLLVMCC=" + #$(this-package-native-input "clang") + "/bin/clang") + (string-append "-DLLVMCXX=" + #$(this-package-native-input "clang") + "/bin/clang++") + "-DKLEE_ENABLE_TIMESTAMP=OFF" + "-DENABLE_KLEE_ASSERTS=ON" + "-DENABLE_POSIX_RUNTIME=ON" + "-DENABLE_UNIT_TESTS=ON" + "-DENABLE_SYSTEM_TESTS=ON" + "-Wno-dev") + #:test-target "check")) + (native-inputs + `(("clang" ,clang-toolchain-12) + ("googletest" ,googletest) + ("python-lit" ,python-lit))) + (inputs (list cryptominisat gperftools llvm-12 + python python-tabulate sqlite stp z3)) + (home-page "https://klee.github.io") + (synopsis "Symbolic execution engine") + (description "@code{KLEE} is a symbolic virtual machine built on top of the LLVM compiler infrastructure.") + (license ncsa))) -- cgit 1.4.1