From 0dc9e58929252f249efc8b51e1171f940adda3d0 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Mon, 2 Aug 2021 16:07:08 +0200 Subject: gnu: Add jsonnet. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cpp.scm (jsonnet): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/cpp.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 42e9d50687..8c8109fb83 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -45,6 +45,7 @@ (define-module (gnu packages cpp) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix modules) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) @@ -1211,3 +1212,40 @@ (define-public xsd ;; incompatible with the GPL v2. Refer to the file named FLOSSE for the ;; details. (license license:gpl2+))) + +(define-public jsonnet + (package + (name "jsonnet") + (version "0.17.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/google/jsonnet") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1ddz14699v5lqx3dh0mb7hfffr6fk5zhmzn3z8yxkqqvriqnciim")) + (modules '((guix build utils))) + (snippet + #~(begin + (rename-file "third_party/md5" ".md5") + (delete-file-recursively "third_party") + (delete-file-recursively "doc/third_party") + (substitute* '("core/vm.cpp") + (("#include \"json.hpp\"") "#include ")) + (mkdir "third_party") + (rename-file ".md5" "third_party/md5"))))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags '("-DUSE_SYSTEM_GTEST=ON" "-DUSE_SYSTEM_JSON=ON"))) + (native-inputs + `(("googletest" ,googletest) + ("pkg-config" ,pkg-config))) + (inputs + `(("json-modern-cxx" ,json-modern-cxx))) + (home-page "https://jsonnet.org/") + (synopsis "Data templating language") + (description "Jsonnet is a templating language extending JSON +syntax with variables, conditions, functions and more.") + (license license:asl2.0))) -- cgit v1.2.3 From 1ad0da60d81f4ba59f5f97af930e9b09f561d277 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 12 Aug 2021 09:55:58 +0200 Subject: gnu: jsonnet: Do not build static libraries. * gnu/packages/cpp.scm (jsonnet)[arguments]: Pass "-DBUILD_STATIC_LIBS=OFF". --- gnu/packages/cpp.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 8c8109fb83..ba921fac11 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Ethan R. Jones ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2018 Fis Trivial -;;; Copyright © 2018 Ludovic Courtès +;;; Copyright © 2018, 2021 Ludovic Courtès ;;; Copyright © 2019, 2020 Mathieu Othacehe ;;; Copyright © 2019 Pierre Neidhardt ;;; Copyright © 2019 Jan Wielkiewicz @@ -1238,7 +1238,8 @@ (define-public jsonnet (rename-file ".md5" "third_party/md5"))))) (build-system cmake-build-system) (arguments - `(#:configure-flags '("-DUSE_SYSTEM_GTEST=ON" "-DUSE_SYSTEM_JSON=ON"))) + `(#:configure-flags '("-DUSE_SYSTEM_GTEST=ON" "-DUSE_SYSTEM_JSON=ON" + "-DBUILD_STATIC_LIBS=OFF"))) (native-inputs `(("googletest" ,googletest) ("pkg-config" ,pkg-config))) -- cgit v1.2.3 From ed4dd53b1ee1dca1740b72ddc798a27cc4a012e6 Mon Sep 17 00:00:00 2001 From: nixo Date: Wed, 27 Jan 2021 23:44:04 +0100 Subject: gnu: Add cpp-httplib. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cpp.scm (cpp-httplib): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/cpp.scm | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index ba921fac11..f4708eda91 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -18,7 +18,7 @@ ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Milkey Mouse ;;; Copyright © 2021 Raghav Gururajan - +;;; Copyright © 2021 Nicolò Balzarotti ;;; ;;; This file is part of GNU Guix. ;;; @@ -66,6 +66,7 @@ (define-module (gnu packages cpp) #:use-module (gnu packages maths) #:use-module (gnu packages onc-rpc) #:use-module (gnu packages perl) + #:use-module (gnu packages python) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) #:use-module (gnu packages pretty-print) @@ -556,6 +557,66 @@ (define-public gperftools @end itemize\n") (license license:bsd-3))) +(define-public cpp-httplib + ;; this package is not graftable, as everything is implemented in a single + ;; header + (package + (name "cpp-httplib") + (version "0.8.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/yhirose/cpp-httplib") + (commit (string-append "v" version)))) + (sha256 + (base32 "0c0gyfbvm34bgrqy9fhfxw1f8nb9zhf063j7xq91k892flb7qm1c")) + (file-name (git-file-name name version)))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + '("-DBUILD_SHARED_LIBS=ON" + "-DHTTPLIB_COMPILE=ON" + "-DHTTPLIB_REQUIRE_BROTLI=ON" + "-DHTTPLIB_REQUIRE_OPENSSL=ON" + "-DHTTPLIB_REQUIRE_ZLIB=ON") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-network-tests + (lambda _ + (for-each + (lambda (test) + (substitute* "test/test.cc" + (((string-append "\\(" test)) + (string-append "(DISABLED_" test)))) + ;; There are tests requiring network access, disable them + '("AbsoluteRedirectTest" "BaseAuthTest" "CancelTest" + "ChunkedEncodingTest" "ChunkedEncodingTest" + "DecodeWithChunkedEncoding" "DefaultHeadersTest" + "DigestAuthTest" "HttpsToHttpRedirectTest" + "RangeTest" "RedirectTest" "RelativeRedirectTest" + "SSLClientTest" "SendAPI" "TooManyRedirectTest" "UrlWithSpace" + "YahooRedirectTest" "YahooRedirectTest")))) + (replace 'check + (lambda* (#:key source tests? #:allow-other-keys) + ;; openssl genrsa wants to write a file in the git checkout + (when tests? + (with-directory-excursion "../source/test" + (invoke "make")))))))) + (native-inputs + ;; required to build shared lib + `(("python" ,python))) + (inputs + `(("brotli" ,brotli) + ("openssl" ,openssl) + ("zlib" ,zlib))) + (home-page "https://github.com/yhirose/cpp-httplib") + (synopsis "C++ HTTP/HTTPS server and client library") + (description "cpp-httplib is a C++11 single-file cross platform blocking +HTTP/HTTPS library, easy to setup. It can also be used as a single-header +library.") + (license license:expat))) + (define-public cpplint (package (name "cpplint") -- cgit v1.2.3