1 { lib, stdenv, fetchurl, python3, bzip2, zlib, gmp, openssl, boost
2 # Passed by version specific builders
3 , baseVersion, revision, sha256
4 , sourceExtension ? "tar.xz"
5 , extraConfigureFlags ? ""
12 stdenv.mkDerivation rec {
14 version = "${baseVersion}.${revision}";
17 name = "Botan-${version}.${sourceExtension}";
19 "http://files.randombit.net/botan/v${baseVersion}/Botan-${version}.${sourceExtension}"
20 "http://botan.randombit.net/releases/Botan-${version}.${sourceExtension}"
26 buildInputs = [ python3 bzip2 zlib gmp openssl boost ]
27 ++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
30 python configure.py --prefix=$out --with-bzip2 --with-zlib ${if openssl != null then "--with-openssl" else ""} ${extraConfigureFlags}${if stdenv.cc.isClang then " --cc=clang" else "" }
33 enableParallelBuilding = true;
36 if [ -d src/scripts ]; then
37 patchShebangs src/scripts
42 cd "$out"/lib/pkgconfig
43 ln -s botan-*.pc botan.pc || true
48 description = "Cryptographic algorithms library";
49 maintainers = with maintainers; [ raskin ];
50 platforms = platforms.unix;
51 license = licenses.bsd2;
53 passthru.updateInfo.downloadPage = "http://files.randombit.net/botan/";