From 36cde8fa8e895ee0e96319a9ac7ab1b8616aa14e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jan 2022 17:20:31 +0100 Subject: gnu: json-modern-cxx: Update to 3.10.5. * gnu/packages/cpp.scm (json-modern-cxx): Update to 3.10.5. [source](snippet): Adjust for upstream changes. [arguments]: Remove obsolete workaround. --- gnu/packages/cpp.scm | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 1bae2966b9..6ee412c0c1 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2020, 2021 Ricardo Wurmus ;;; Copyright © 2020 Brice Waegeneire ;;; Copyright © 2020, 2021 Vinicius Monego -;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2020, 2022 Marius Bakke ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Alexandros Theodotou ;;; Copyright © 2020, 2021 Greg Hogan @@ -496,7 +496,7 @@ as ordering relation.") (define-public json-modern-cxx (package (name "json-modern-cxx") - (version "3.9.1") + (version "3.10.5") (home-page "https://github.com/nlohmann/json") (source (origin @@ -504,7 +504,7 @@ as ordering relation.") (uri (git-reference (url home-page) (commit (string-append "v" version)))) (sha256 - (base32 "0ar4mzp53lskxw3vdzw07f47njcshl3lwid9jfq6l7yx6ds2nyjc")) + (base32 "1f9mi45ilwjc2w92grjc53sw038840bjpn8yjf6wc6bxs2nijfqd")) (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet @@ -513,7 +513,7 @@ as ordering relation.") ;; is a wrapper library added by this package. (install-file "./test/thirdparty/doctest/doctest_compatibility.h" "/tmp") (for-each delete-file-recursively - '("./third_party" "./test/thirdparty" "./benchmarks/thirdparty")) + '("./third_party" "./test/thirdparty")) (install-file "/tmp/doctest_compatibility.h" "./test/thirdparty/doctest") ;; Adjust for the unbundled fifo_map and doctest. @@ -525,8 +525,7 @@ as ordering relation.") (substitute* files (("#include ?\"(fifo_map.hpp)\"" all fifo-map-hpp) (string-append - "#include "))))) - #t)))) + "#include "))))))))) (build-system cmake-build-system) (arguments '(#:configure-flags @@ -534,18 +533,12 @@ as ordering relation.") (string-append "-DJSON_TestDataDirectory=" (assoc-ref %build-inputs "json_test_data"))) #:phases (modify-phases %standard-phases - ;; XXX: When tests are enabled, the install phase will cause - ;; a needless rebuild without the given configure flags, - ;; ultimately creating both $out/lib and $out/lib64. Move - ;; the check phase after install to work around it. - (delete 'check) - (add-after 'install 'check + (replace 'check (lambda* (#:key tests? #:allow-other-keys) (if tests? ;; Some tests need git and a full checkout, skip those. (invoke "ctest" "-LE" "git_required") - (format #t "test suite not run~%")) - #t))))) + (format #t "test suite not run~%"))))))) (native-inputs `(("amalgamate" ,amalgamate) ("doctest" ,doctest) -- cgit v1.3 From 2b4aeda7559b458d8308151f2b2935831d18826b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jan 2022 17:22:32 +0100 Subject: gnu: json-modern-cxx: Run tests in parallel. * gnu/packages/cpp.scm (json-modern-cxx)[arguments]: Respect PARALLEL-TESTS? in check phase. --- gnu/packages/cpp.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 6ee412c0c1..a1596314dc 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -534,10 +534,13 @@ as ordering relation.") (assoc-ref %build-inputs "json_test_data"))) #:phases (modify-phases %standard-phases (replace 'check - (lambda* (#:key tests? #:allow-other-keys) + (lambda* (#:key tests? parallel-tests? #:allow-other-keys) (if tests? ;; Some tests need git and a full checkout, skip those. - (invoke "ctest" "-LE" "git_required") + (invoke "ctest" "-LE" "git_required" + "-j" (if parallel-tests? + (number->string (parallel-job-count)) + "1")) (format #t "test suite not run~%"))))))) (native-inputs `(("amalgamate" ,amalgamate) -- cgit v1.3 From f89bf66690e6863a822d756a39242bd0b998d3e5 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jan 2022 17:28:43 +0100 Subject: gnu: fifo-map: Use a release tag. * gnu/packages/cpp.scm (fifo-map): Update to 1.0.0, which is one (inconsequential) commit ahead of our custom "1.1.1" version. [arguments]: Respect TESTS? in check phase while at it. --- gnu/packages/cpp.scm | 73 +++++++++++++++++++++++++--------------------------- 1 file changed, 35 insertions(+), 38 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index a1596314dc..9eddae626e 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -452,46 +452,43 @@ functions, class methods, and stl containers. (license license:bsd-3))) (define-public fifo-map - (let* ((commit "0dfbf5dacbb15a32c43f912a7e66a54aae39d0f9") - (revision "0") - (version (git-version "1.1.1" revision commit))) - (package - (name "fifo-map") - (version version) - (home-page "https://github.com/nlohmann/fifo_map") - (source (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit commit))) - (sha256 - (base32 - "0pi77b75kp0l7z454ihcd14nzpi3nc5m4nyjbsgy5f9bw3676196")) - (patches (search-patches "fifo-map-remove-catch.hpp.patch" - "fifo-map-fix-flags-for-gcc.patch")) - (file-name (git-file-name name version)) - (modules '((guix build utils))) - (snippet '(delete-file-recursively "./test/thirdparty")))) - (native-inputs - (list catch-framework2-1)) - (build-system cmake-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "./unit"))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (inc (string-append out "/include/fifo_map"))) - (with-directory-excursion "../source" - (install-file "src/fifo_map.hpp" inc)))))))) - (synopsis "FIFO-ordered associative container for C++") - (description "Fifo_map is a C++ header only library for associative + (package + (name "fifo-map") + (version "1.0.0") + (home-page "https://github.com/nlohmann/fifo_map") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (sha256 + (base32 + "0y59fk6ycrgjln9liwcja3l5j1vxpa5i671bynpbsjlyq5f2560q")) + (patches (search-patches "fifo-map-remove-catch.hpp.patch" + "fifo-map-fix-flags-for-gcc.patch")) + (file-name (git-file-name name version)) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "./test/thirdparty")))) + (native-inputs + (list catch-framework2-1)) + (build-system cmake-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? (invoke "./unit")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (inc (string-append out "/include/fifo_map"))) + (with-directory-excursion "../source" + (install-file "src/fifo_map.hpp" inc)))))))) + (synopsis "FIFO-ordered associative container for C++") + (description "Fifo_map is a C++ header only library for associative container which uses the order in which keys were inserted to the container as ordering relation.") - (license license:expat)))) + (license license:expat))) (define-public json-modern-cxx (package -- cgit v1.3 From 018d2c12430495ffe86dcbe2fb59d1f0144a3fe6 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jan 2022 17:33:07 +0100 Subject: gnu: fifo-map: Fix cross-compilation. * gnu/packages/cpp.scm (fifo-map)[native-inputs]: Move CATCH-FRAMEWORK2-1 ... [inputs]: ... here. --- gnu/packages/cpp.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 9eddae626e..9927d79e37 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -469,7 +469,7 @@ functions, class methods, and stl containers. (file-name (git-file-name name version)) (modules '((guix build utils))) (snippet '(delete-file-recursively "./test/thirdparty")))) - (native-inputs + (inputs (list catch-framework2-1)) (build-system cmake-build-system) (arguments -- cgit v1.3 From 7ad2cfcc7227b0aeabeae4f2f89bb9631eb9ab98 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jan 2022 17:40:01 +0100 Subject: gnu: json-modern-cxx: Remove input labels. * gnu/packages/cpp.scm (json-modern-cxx)[native-inputs]: Remove labels. [arguments]: Use SEARCH-INPUT-FILE. --- gnu/packages/cpp.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 9927d79e37..5b4eee151f 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -528,7 +528,9 @@ as ordering relation.") '(#:configure-flags (list "-DJSON_MultipleHeaders=ON" ; For json_fwd.hpp. (string-append "-DJSON_TestDataDirectory=" - (assoc-ref %build-inputs "json_test_data"))) + (dirname + (search-input-directory %build-inputs + "json_nlohmann_tests")))) #:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? parallel-tests? #:allow-other-keys) @@ -540,19 +542,17 @@ as ordering relation.") "1")) (format #t "test suite not run~%"))))))) (native-inputs - `(("amalgamate" ,amalgamate) - ("doctest" ,doctest) - ("json_test_data" - ,(let ((version "3.0.0")) - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/nlohmann/json_test_data") - (commit (string-append "v" version)))) - (file-name (git-file-name "json_test_data" version)) - (sha256 - (base32 - "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv"))))))) + (list amalgamate doctest + (let ((version "3.0.0")) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/nlohmann/json_test_data") + (commit (string-append "v" version)))) + (file-name (git-file-name "json_test_data" version)) + (sha256 + (base32 + "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))))) (inputs (list fifo-map)) (synopsis "JSON parser and printer library for C++") -- cgit v1.3 From c065fca7f5feaeb8693b47089d53f85c594fb709 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 30 Jan 2022 17:43:15 +0100 Subject: gnu: json-modern-cxx: Fix cross-compilation. * gnu/packages/cpp.scm (json-modern-cxx)[native-inputs]: Move DOCTEST ... [inputs]: ... here. --- gnu/packages/cpp.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 5b4eee151f..ba54dbcda8 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -542,7 +542,7 @@ as ordering relation.") "1")) (format #t "test suite not run~%"))))))) (native-inputs - (list amalgamate doctest + (list amalgamate (let ((version "3.0.0")) (origin (method git-fetch) @@ -554,7 +554,7 @@ as ordering relation.") (base32 "0nzsjzlvk14dazwh7k2jb1dinb0pv9jbx5jsyn264wvva0y7daiv")))))) (inputs - (list fifo-map)) + (list doctest fifo-map)) (synopsis "JSON parser and printer library for C++") (description "JSON for Modern C++ is a C++ JSON library that provides intuitive syntax and trivial integration.") -- cgit v1.3 From 07e4efae7b188100ee8d7cc37b0a3a1adc3cfe74 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 3 Feb 2022 18:33:08 +0100 Subject: gnu: pegtl: Update to 3.2.2. * gnu/packages/cpp.scm (pegtl): Update to 3.2.2. --- gnu/packages/cpp.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index ba54dbcda8..3c68cd86a0 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -955,7 +955,7 @@ Google's C++ code base.") (define-public pegtl (package (name "pegtl") - (version "2.8.3") + (version "3.2.2") (source (origin (method git-fetch) (uri (git-reference @@ -964,7 +964,7 @@ Google's C++ code base.") (file-name (git-file-name name version)) (sha256 (base32 - "17crgjfdx55imi2dqnz6xpvsxq07390yfgkz5nd2g77ydkvq9db3")))) + "1viwrlsw5nwvbv8d88mf5r77syapgxx3xm1kv5kmn6drw8jgsmzf")))) (build-system cmake-build-system) (home-page "https://github.com/taocpp/PEGTL") (synopsis "Parsing Expression Grammar template library") -- cgit v1.3 From 4469990f2e4b300781c93dfd41a82c41611842e3 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Wed, 3 Nov 2021 15:20:51 +0000 Subject: gnu: Add bloomberg-bde-tools. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cpp.scm (bloomberg-bde-tools): New variable. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/cpp.scm | 30 ++++++- .../bloomberg-bde-tools-fix-install-path.patch | 95 ++++++++++++++++++++++ 3 files changed, 125 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 2a2fbf79d4..82c08cfa02 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -912,6 +912,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-mingw-w64-timestamp.patch \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ %D%/packages/patches/binutils-CVE-2021-45078.patch \ + %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 3c68cd86a0..3bc77ff017 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2020, 2022 Marius Bakke ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Alexandros Theodotou -;;; Copyright © 2020, 2021 Greg Hogan +;;; Copyright © 2020-2022 Greg Hogan ;;; Copyright © 2020 Brett Gilio ;;; Copyright © 2020 Milkey Mouse ;;; Copyright © 2021 Raghav Gururajan @@ -48,6 +48,7 @@ #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix modules) @@ -1585,3 +1586,30 @@ microparallel algorithms to implement a strict JSON parser with UTF-8 validation.") (home-page "https://github.com/simdjson/simdjson") (license license:asl2.0))) + +(define-public bloomberg-bde-tools + (let ((commit "094885bd177e0159232d4e6a060a04edb1edd786")) + (package + (name "bloomberg-bde-tools") + ;; Recent releases are not tagged so commit must be used for checkout. + (version "3.97.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bloomberg/bde-tools") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0mbbai73z8amh23ah3wy35kmy612380yr5wg89mic60qwqmpqb02")) + (patches + (search-patches + "bloomberg-bde-tools-fix-install-path.patch")))) + (build-system copy-build-system) + ;; Unable to be an inline dependency of bloomberg-bde due to patch. + (properties '((hidden? . #t))) + (synopsis "Tools for developing and building libraries modeled on BDE") + (description + "This package provides the cmake imports needed to build bloomberg-bde.") + (home-page "https://github.com/bloomberg/bde-tools") + (license license:asl2.0)))) diff --git a/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch new file mode 100644 index 0000000000..a80c6c3ea3 --- /dev/null +++ b/gnu/packages/patches/bloomberg-bde-tools-fix-install-path.patch @@ -0,0 +1,95 @@ +Install shared libraries into "lib". Do not create symbolic links to static +libraries since only shared libraries are built. + +--- a/cmake/layers/ufid.cmake ++++ b/cmake/layers/ufid.cmake +@@ -6,10 +6,7 @@ bde_prefixed_override(ufid project_setup_install_opts) + function(ufid_project_setup_install_opts proj) + bde_assert_no_extra_args() + +- set(libPath "bin/so") +- if (${bde_ufid_is_64}) +- string(APPEND libPath "/64") +- endif() ++ set(libPath "lib") + + bde_struct_create( + installOpts +@@ -86,13 +83,6 @@ function(bde_create_ufid_symlink uor installOpts) + "${symlinkPrefix}/${symlinkDir}/${libLinkName}" + ) + +- install( +- CODE +- "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${symlinkVal} ${symlinkFile})" +- COMPONENT "${component}-symlinks" +- ) +- + # This code creates compatibility symlinks + # WARNING: This is custom logic that has nothing to do with our build system. + # Some external build systems expect to find a variaty of ufids in dpkg. +@@ -110,14 +100,6 @@ function(bde_create_ufid_symlink uor installOpts) + symlinkFile + "${symlinkPrefix}/${symlinkDir}/${libLinkName}" + ) +- +- # IMPORTANT: symlinkFile is the same as above! +- install( +- CODE +- "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${symlinkVal} ${symlinkFile})" +- COMPONENT "${component}-symlinks" +- ) + endif() + + if (${bde_ufid_is_pic}) +@@ -134,14 +116,6 @@ function(bde_create_ufid_symlink uor installOpts) + "${symlinkPrefix}/${symlinkDir}/${libLinkName}" + ) + +- # IMPORTANT: symlinkFile is the same as above! +- install( +- CODE +- "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${symlinkVal} ${symlinkFile})" +- COMPONENT "${component}-pic-symlink-hack" +- ) +- + # And another one for "64" - remove "pic", add "64" + if (${bde_ufid_is_64}) + set(temp_ufid_flags ${install_ufid_flags}) +@@ -157,14 +131,6 @@ function(bde_create_ufid_symlink uor installOpts) + symlinkFile + "${symlinkPrefix}/${symlinkDir}/${libLinkName}" + ) +- +- # IMPORTANT: symlinkFile is the same as above! +- install( +- CODE +- "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${symlinkVal} ${symlinkFile})" +- COMPONENT "${component}-pic-symlink-hack" +- ) + endif() + endif() + +@@ -177,18 +143,5 @@ function(bde_create_ufid_symlink uor installOpts) + symlinkReleaseFile + "${symlinkPrefix}/${symlinkDir}/${libReleaseLinkName}" + ) +- install( +- CODE +- "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${symlinkVal} ${symlinkReleaseFile})" +- COMPONENT "${component}-release-symlink" +- ) +- install( +- CODE +- "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ +- ${symlinkVal} ${symlinkReleaseFile})" +- COMPONENT "release-symlink" +- EXCLUDE_FROM_ALL +- ) + endif() + endfunction() -- cgit v1.3 From 7fbb6fe0e1035e2a09fe9ffcd5b91c1586510f99 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Wed, 3 Nov 2021 15:22:19 +0000 Subject: gnu: Add bloomberg-bde. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/cpp.scm (bloomberg-bde): New variable. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/cpp.scm | 75 +++++++++++++++++++++- .../patches/bloomberg-bde-cmake-module-path.patch | 16 +++++ 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/bloomberg-bde-cmake-module-path.patch (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 82c08cfa02..f14daf2edd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -912,6 +912,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-mingw-w64-timestamp.patch \ %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ %D%/packages/patches/binutils-CVE-2021-45078.patch \ + %D%/packages/patches/bloomberg-bde-cmake-module-path.patch \ %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ %D%/packages/patches/byobu-writable-status.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 3bc77ff017..a77ac84f17 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -80,7 +80,8 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages tls) #:use-module (gnu packages web) - #:use-module (gnu packages xml)) + #:use-module (gnu packages xml) + #:use-module (ice-9 match)) (define-public argagg (let ((commit "79e4adfa2c6e2bfbe63da05cc668eb9ad5596748") (revision "0")) @@ -1613,3 +1614,75 @@ validation.") "This package provides the cmake imports needed to build bloomberg-bde.") (home-page "https://github.com/bloomberg/bde-tools") (license license:asl2.0)))) + +(define-public bloomberg-bde + (let ((commit "b6bcc0e24a5862bf77aea7edd831dedf50e21d64")) + (package + (name "bloomberg-bde") + ;; Recent releases are not tagged so commit must be used for checkout. + (version "3.98.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bloomberg/bde") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0y3lipi1lj9qazgc935851r2qsx5aq3vvc4y52jq57riyz8wg3ma")) + (patches + (search-patches + "bloomberg-bde-cmake-module-path.patch")) + ;;(modules '((guix build utils))) + (snippet + `(begin + ;; FIXME: Delete bundled software. The third-party packages + ;; may be patched or modified from upstream sources. + ;;(for-each delete-file-recursively + ;; (list "thirdparty")) + ;; Delete failing tests. + (for-each + delete-file + (list "groups/bal/ball/ball_asyncfileobserver.t.cpp" + "groups/bal/ball/ball_fileobserver2.t.cpp" + "groups/bal/ball/ball_recordstringformatter.t.cpp" + "groups/bal/balst/balst_stacktraceutil.t.cpp" + "groups/bdl/bdlmt/bdlmt_eventscheduler.t.cpp" + "groups/bdl/bdlmt/bdlmt_timereventscheduler.t.cpp" + "groups/bdl/bdls/bdls_filesystemutil.t.cpp" + "groups/bsl/bslh/bslh_hashpair.t.cpp" + "groups/bsl/bsls/bsls_platform.t.cpp" + "groups/bsl/bsls/bsls_stackaddressutil.t.cpp" + "groups/bsl/bsls/bsls_stopwatch.t.cpp" + "groups/bsl/bslstl/bslstl_function_invokerutil.t.cpp")) + #t)))) + (build-system cmake-build-system) + (arguments + `(#:parallel-tests? #f ; Test parallelism may fail inconsistently. + ;; Set UFID to build shared libraries. Flag descriptions can be found at + ;; https://bloomberg.github.io/bde-tools/reference/bde_repo.html#ufid + #:configure-flags ,(match %current-system + ((or "i686-linux" "armhf-linux") + ''("-DUFID=opt_dbg_exc_mt_32_shr_cpp17")) + (_ + ''("-DUFID=opt_dbg_exc_mt_64_shr_cpp17"))) + #:phases + (modify-phases %standard-phases + ;; Explicitly build tests separate from the main build. + (add-after 'build 'build-tests + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "all.t" + `(,@(if #:parallel-build? + `("-j" ,(number->string (parallel-job-count))) + '()) + ,@make-flags))))))) + (native-inputs + (list bloomberg-bde-tools pkg-config python)) + (synopsis "Foundational C++ libraries used at Bloomberg") + (description + "The BDE Development Environment libraries provide an enhanced +implementation of STL containers, vocabulary types for representing common +concepts (like dates and times), and building blocks for developing +multi-threaded applications and network applications.") + (home-page "https://github.com/bloomberg/bde") + (license license:asl2.0)))) diff --git a/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch new file mode 100644 index 0000000000..b08ca5eac0 --- /dev/null +++ b/gnu/packages/patches/bloomberg-bde-cmake-module-path.patch @@ -0,0 +1,16 @@ +This package requires CMAKE_MODULE_PATH be set by the calling process. This +patch uses the CMAKE_PREFIX_PATH passed from Guix as the search path for +locating the bloomberg-bde-tools CMake modules. + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,8 +1,6 @@ + cmake_minimum_required(VERSION 3.15) + +-if (NOT CMAKE_MODULE_PATH) +- message(FATAL "Please specify path to BDE cmake modules.") +-endif() ++string(REPLACE ":" "cmake/;" CMAKE_MODULE_PATH "$ENV{CMAKE_PREFIX_PATH}cmake/") + + get_filename_component(repoName ${CMAKE_CURRENT_LIST_DIR} NAME) + -- cgit v1.3 From 6ff0a6d53a4f5c3faa4a4b6503dab47ea2cc2426 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 9 Feb 2022 22:28:12 +0100 Subject: gnu: cpplint: Update to 1.5.5. * gnu/packages/cpp.scm (cpplint): Update to 1.5.5. [arguments]: Remove obsolete phase. Override check phase. [native-inputs]: Add PYTHON-COVERAGE and PYTHON-TESTFIXTURES. --- gnu/packages/cpp.scm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index a77ac84f17..09ba10d9ab 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -74,6 +74,7 @@ #:use-module (gnu packages onc-rpc) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages python-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) #:use-module (gnu packages pretty-print) @@ -766,7 +767,7 @@ library.") (define-public cpplint (package (name "cpplint") - (version "1.4.5") + (version "1.5.5") (source (origin (method git-fetch) @@ -776,19 +777,22 @@ library.") (url "https://github.com/cpplint/cpplint") (commit version))) (sha256 - (base32 "1yzcxqx0186sh80p0ydl9z0ld51fn2cdpz9hmhrp15j53g9ira7c")) + (base32 "13l86aq0h1jga949k79k9x3hw2xqchjc162sclg2f99vz98zcz15")) (file-name (git-file-name name version)))) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'check 'use-later-pytest - (lambda _ - (substitute* "test-requirements" - (("pytest.*") "pytest\n")) - #t))))) + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv"))))))) (build-system python-build-system) (native-inputs - (list python-pytest python-pytest-cov python-pytest-runner)) + (list python-coverage + python-pytest + python-pytest-cov + python-pytest-runner + python-testfixtures)) (home-page "https://github.com/cpplint/cpplint") (synopsis "Static code checker for C++") (description "@code{cpplint} is a command-line tool to check C/C++ files -- cgit v1.3 From f97fe92b570b01ed1b03abd4f3ec89bf20ebc9db Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 9 Feb 2022 23:38:10 +0100 Subject: gnu: cpplint: Reduce closure size. * gnu/packages/cpp.scm (cpplint)[arguments]: Add #:modules. Add phases to adjust GUIX_PYTHONPATH before the wrap phase. --- gnu/packages/cpp.scm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'gnu/packages/cpp.scm') diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 09ba10d9ab..86138531c0 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -780,8 +780,35 @@ library.") (base32 "13l86aq0h1jga949k79k9x3hw2xqchjc162sclg2f99vz98zcz15")) (file-name (git-file-name name version)))) (arguments - (list #:phases - #~(modify-phases %standard-phases + (list #:modules `((srfi srfi-1) + (srfi srfi-26) + ,@%python-build-system-modules) + #:phases + #~(modify-phases (@ (guix build python-build-system) %standard-phases) + (add-before 'wrap 'reduce-GUIX_PYTHONPATH + (lambda _ + ;; Hide the transitive native inputs from GUIX_PYTHONPATH + ;; to prevent them from ending up in the run-time closure. + ;; See also . + (let ((transitive-native-inputs + '#$(match (package-transitive-native-inputs + this-package) + (((labels packages) ...) packages)))) + ;; Save the original PYTHONPATH because we need it for + ;; tests later. + (setenv "TMP_PYTHONPATH" (getenv "GUIX_PYTHONPATH")) + (setenv "GUIX_PYTHONPATH" + (string-join + (filter (lambda (path) + (not (any (cut string-prefix? <> path) + transitive-native-inputs))) + (search-path-as-string->list + (getenv "GUIX_PYTHONPATH"))) + ":"))))) + (add-after 'wrap 'reset-GUIX_PYTHONPATH + (lambda _ + (setenv "GUIX_PYTHONPATH" + (getenv "TMP_PYTHONPATH")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? -- cgit v1.3