depot/third_party/nixpkgs/pkgs/applications/science/math/msieve/default.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

33 lines
904 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 = "A 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;
};
}