···175175 done
176176 '';
177177178178- enableParallelBuilding = true;
178178+ # Until https://github.com/NixOS/nixpkgs/pull/172617 is applied,
179179+ # parallel builds do not always work because of a bug in dlltool.
180180+ enableParallelBuilding = false;
179181180182 # https://bugs.winehq.org/show_bug.cgi?id=43530
181183 # https://github.com/NixOS/nixpkgs/issues/31989
···11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, cmake
55+, primesieve
66+}:
77+88+stdenv.mkDerivation rec {
99+ pname = "primecount";
1010+ version = "7.3";
1111+1212+ src = fetchFromGitHub {
1313+ owner = "kimwalisch";
1414+ repo = "primecount";
1515+ rev = "v${version}";
1616+ hash = "sha256-hxnn1uiGSB6XRC7yK+SXTwTsJfjhemWXsMNhhL7Ghek=";
1717+ };
1818+1919+ nativeBuildInputs = [ cmake ];
2020+2121+ buildInputs = [ primesieve ];
2222+2323+ cmakeFlags = [
2424+ "-DBUILD_LIBPRIMESIEVE=ON"
2525+ "-DBUILD_PRIMECOUNT=ON"
2626+ "-DBUILD_SHARED_LIBS=ON"
2727+ "-DBUILD_STATIC_LIBS=OFF"
2828+ "-DBUILD_TESTS=ON"
2929+ ];
3030+3131+ meta = with lib; {
3232+ homepage = "https://github.com/kimwalisch/primecount";
3333+ description = "Fast prime counting function implementations";
3434+ longDescription = ''
3535+ primecount is a command-line program and C/C++ library that counts the
3636+ primes below an integer x ≤ 10^31 using highly optimized implementations
3737+ of the combinatorial prime counting algorithms.
3838+3939+ primecount includes implementations of all important combinatorial prime
4040+ counting algorithms known up to this date all of which have been
4141+ parallelized using OpenMP. primecount contains the first ever open source
4242+ implementations of the Deleglise-Rivat algorithm and Xavier Gourdon's
4343+ algorithm (that works). primecount also features a novel load balancer
4444+ that is shared amongst all implementations and that scales up to hundreds
4545+ of CPU cores. primecount has already been used to compute several prime
4646+ counting function world records.
4747+ '';
4848+ license = licenses.bsd2;
4949+ inherit (primesieve.meta) maintainers platforms;
5050+ };
5151+}
···11+{ lib
22+, stdenv
33+, fetchFromGitHub
44+, cmake
55+}:
66+77+stdenv.mkDerivation rec {
88+ pname = "primesieve";
99+ version = "7.9";
1010+1111+ src = fetchFromGitHub {
1212+ owner = "kimwalisch";
1313+ repo = "primesieve";
1414+ rev = "v${version}";
1515+ hash = "sha256-lwT+adKFoNI125y5FuJMovtMh8sFi9oqMLYGLabzrCI=";
1616+ };
1717+1818+ nativeBuildInputs = [ cmake ];
1919+2020+ meta = with lib; {
2121+ homepage = "https://primesieve.org/";
2222+ description = "Fast C/C++ prime number generator";
2323+ longDescription = ''
2424+ primesieve is a command-line program and C/C++ library for quickly
2525+ generating prime numbers. It is very cache efficient, it detects your
2626+ CPU's L1 & L2 cache sizes and allocates its main data structures
2727+ accordingly. It is also multi-threaded by default, it uses all available
2828+ CPU cores whenever possible i.e. if sequential ordering is not
2929+ required. primesieve can generate primes and prime k-tuplets up to 264.
3030+ '';
3131+ license = licenses.bsd2;
3232+ maintainers = teams.sage.members ++
3333+ (with maintainers; [ abbradar AndersonTorres ]);
3434+ platforms = platforms.unix;
3535+ };
3636+}