depot/third_party/nixpkgs/pkgs/applications/science/math/msieve/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

33 lines
902 B
Nix

{ lib, stdenv, fetchsvn, zlib, gmp, ecm }:
stdenv.mkDerivation rec {
pname = "msieve";
version = "1056";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/msieve/code/trunk";
rev = version;
hash = "sha256-6ErVn4pYPMG5VFjOQURLsHNpN0pGdp55+rjY8988onU=";
};
buildInputs = [ zlib gmp ecm ];
ECM = if ecm == null then "0" else "1";
# Doesn't hurt Linux but lets clang-based platforms like Darwin work fine too
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "all" ];
installPhase = ''
mkdir -p $out/bin/
cp msieve $out/bin/
'';
meta = {
description = "C library implementing a suite of algorithms to factor large integers";
mainProgram = "msieve";
license = lib.licenses.publicDomain;
homepage = "http://msieve.sourceforge.net/";
maintainers = [ lib.maintainers.roconnor ];
platforms = [ "x86_64-linux" ] ++ lib.platforms.darwin;
};
}