nixpkgs/pkgs/development/libraries/botan/generic.nix

44 lines
1.1 KiB
Nix
Raw Normal View History

2014-10-31 20:31:19 +03:00
{ stdenv, fetchurl, python, bzip2, zlib, gmp, openssl, boost
# Passed by version specific builders
, baseVersion, revision, sha256
2015-03-08 21:55:17 +03:00
, extraConfigureFlags ? ""
2014-10-31 20:31:19 +03:00
, ...
}:
stdenv.mkDerivation rec {
name = "botan-${version}";
version = "${baseVersion}.${revision}";
src = fetchurl {
2015-01-06 18:47:02 +03:00
name = "Botan-${version}.tgz";
url = "http://files.randombit.net/botan/v${baseVersion}/Botan-${version}.tgz";
2014-10-31 20:31:19 +03:00
inherit sha256;
};
buildInputs = [ python bzip2 zlib gmp openssl boost ];
configurePhase = ''
2015-03-08 21:55:17 +03:00
python configure.py --prefix=$out --with-bzip2 --with-zlib ${if openssl != null then "--with-openssl" else ""} ${extraConfigureFlags}
2014-10-31 20:31:19 +03:00
'';
enableParallelBuilding = true;
2015-01-06 18:47:02 +03:00
preInstall = ''
patchShebangs src/scripts
'';
2014-10-31 20:31:19 +03:00
postInstall = ''
cd "$out"/lib/pkgconfig
ln -s botan-*.pc botan.pc || true
'';
meta = with stdenv.lib; {
2015-01-06 18:47:02 +03:00
inherit version;
2014-10-31 20:31:19 +03:00
description = "Cryptographic algorithms library";
maintainers = with maintainers; [ raskin ];
platforms = platforms.unix;
license = licenses.bsd2;
};
passthru.updateInfo.downloadPage = "http://files.randombit.net/botan/";
}