@@ -22,6 +22,7 @@
(define-module (gnu packages sagemath)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix download)
@@ -400,3 +401,25 @@ (define-public python-pplpy
"This Python module pplpy provides a wrapper to the C++ Parma Polyhedra
Library (PPL).")
(license license:gpl3)))
+
+(define-public primecount
+ (package
+ (name "primecount")
+ (version "7.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/kimwalisch/primecount/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1dnkkmszc2knrrqmfbwf96ajxd7rpmaw0b8dx6z5r0f9w1wx7ak4"))))
+ (build-system cmake-build-system)
+ (arguments '(#:configure-flags (list "-DBUILD_SHARED_LIBS=ON" "-DBUILD_TESTS=ON")))
+ (home-page "https://github.com/kimwalisch/primecount/")
+ (synopsis "Fast prime counting function implementations")
+ (description "primecount is a command-line program and C/C++ library that counts the number
+of primes ≤ x (maximum 10^31) using highly optimized implementations of the
+combinatorial prime counting algorithms.")
+ (license license:bsd-2)))