depot/third_party/nixpkgs/pkgs/applications/science/math/msieve/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

33 lines
902 B
Nix

{ lib, stdenv, fetchsvn, zlib, gmp, ecm }:
stdenv.mkDerivation rec {
pname = "msieve";
version = "r1050";
src = fetchsvn {
url = "svn://svn.code.sf.net/p/msieve/code/trunk";
rev = "1050";
hash = "sha256-cn6OhE4zhrpB7BFrRdOnucjATbfo5mLkK7O0Usx1quE=";
};
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;
};
}