diff options
| author | Oleg Pykhalov <go.wigust@gmail.com> | 2020-05-11 18:29:06 +0300 |
|---|---|---|
| committer | Oleg Pykhalov <go.wigust@gmail.com> | 2020-05-11 20:12:46 +0300 |
| commit | b0723f4662cfc019359961cdf8688e8cb3772770 (patch) | |
| tree | a26498eab13ed7ff58fa320528d49df0d94daa3c | |
| parent | Add wallpapers. (diff) | |
| download | guix-wigust-b0723f4662cfc019359961cdf8688e8cb3772770.tar.gz | |
gnu: Add libb64.
* guix/wigust/packages/sysdig.scm (libb64): New variable.
| -rw-r--r-- | guix/wigust/packages/sysdig.scm | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/guix/wigust/packages/sysdig.scm b/guix/wigust/packages/sysdig.scm new file mode 100644 index 0000000..b145f55 --- /dev/null +++ b/guix/wigust/packages/sysdig.scm @@ -0,0 +1,156 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(define-module (wigust packages sysdig) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages adns) + #:use-module (gnu packages commencement) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages elf) + #:use-module (gnu packages embedded) + #:use-module (gnu packages file-systems) + #:use-module (gnu packages gcc) + #:use-module (gnu packages lua) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages protobuf) + #:use-module (gnu packages rpc) + #:use-module (gnu packages serialization) + #:use-module (gnu packages tbb) + #:use-module (gnu packages tls) + #:use-module (gnu packages web) + #:use-module (gnu packages xorg) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public libb64 + (package + (name "libb64") + (version "1.2") + (source (origin + (method url-fetch/zipbomb) + (uri (string-append "http://download.draios.com/dependencies/libb64-" + version ".src.zip")) + (sha256 + (base32 + "1lxzi6v10qsl2r6633dx0zwqyvy0j19nmwclfd0d7qybqmhqsg9l")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'chdir + (lambda _ + (chdir (string-append ,name "-" ,version)) + (symlink (which "gcc") "cc") + (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH"))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each (lambda (file) + (install-file file (string-append out "/include/b64"))) + (find-files "include" "\\.h$")) + (install-file "base64/base64" (string-append out "/bin")) + (for-each (lambda (file) + (install-file (string-append "src/" file) + (string-append out "/lib"))) + '("libb64.a" "cencode.o" "cdecode.o")))))))) + (home-page "http://download.draios.com/dependencies/libb64-1.2.src.zip") + (synopsis "ANSI C routines for fast base64 encoding/decoding") + (description "") + (license #f))) + +(define-public sysdig + (package + (name "sysdig") + (version "0.26.7") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/draios/sysdig.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "153g9dmgcnzx12kn6wg30g25bxsqzsvr5xyg1l5180i37n16fi3r")))) + (build-system cmake-build-system) + (inputs + `(;; ("pkg-config" ,pkg-config) + ;; TODO: ("googletest" ,googletest) + ("zlib" ,zlib) + ("luajit" ,lua-5.1) + ("ncurses" ,ncurses) + ("jsoncpp" ,jsoncpp) + ("libb64" ,libb64) + ("openssl" ,openssl) + ("curl" ,curl) + ("jq" ,jq) + ("gcc" ,gcc) + ("elfutils" ,elfutils) + ("tbb" ,tbb) + ("c-ares" ,c-ares) + ("protobuf" ,protobuf) + ("grpc" ,grpc) + )) + (native-inputs + `(("gcc@5" ,gcc-5))) + (arguments + `(#:configure-flags `("-DCMAKE_BUILD_TYPE=Release" + "-DCREATE_TEST_TARGETS=OFF" + "-DUSE_BUNDLED_DEPS=OFF" ;unbundle the dependencies + "-DBUILD_DRIVER=OFF" + "-DBUILD_LIBSCAP_EXAMPLES=OFF" ;libscap examples are not installed + ;; "-DCMAKE_EXE_LINKER_FLAGS=\"-ltbb -lcurl\"" + ;; "-DluaL_reg=luaL_Reg -DluaL_getn(L,i)=((int)lua_objlen(L,i))" + ) + #:modules ((guix build cmake-build-system) + (guix build utils) + (ice-9 match)) + #:phases + (modify-phases %standard-phases + (add-after 'set-paths 'hide-default-gcc + (lambda* (#:key inputs #:allow-other-keys) + (let ((gcc (assoc-ref inputs "gcc"))) + ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent + ;; conflicts with the GCC 5 input. + (for-each (match-lambda ((env path) + (let ((path (string-append gcc path))) + (format #t "Delete ~s from ~a environment variable.~%" path env) + (setenv env + (string-join (delete path + (string-split (getenv env) + #\:)) + ":"))))) + '(("CMAKE_PREFIX_PATH" "/include/c++") + ("CMAKE_PREFIX_PATH" "/include") + ("CPLUS_INCLUDE_PATH" "/include/c++") + ("CPLUS_INCLUDE_PATH" "/include") + ("C_INCLUDE_PATH" "/include"))) + (pk (environ)) + #t)))))) + (home-page "https://sysdig.com/opensource/") + (synopsis "Tracepoint-based system tracing tool for Linux") + (description "") + (license #f))) |
