1 { lib, stdenv, fetchurl, python3, bzip2, zlib, gmp, boost
2 # Passed by version specific builders
3 , baseVersion, revision, sha256
4 , sourceExtension ? "tar.xz"
5 , extraConfigureFlags ? ""
9 , knownVulnerabilities ? [ ]
15 stdenv.mkDerivation rec {
17 version = "${baseVersion}.${revision}";
19 outputs = [ "out" "dev" ];
22 name = "Botan-${version}.${sourceExtension}";
24 "http://files.randombit.net/botan/v${baseVersion}/Botan-${version}.${sourceExtension}"
25 "http://botan.randombit.net/releases/Botan-${version}.${sourceExtension}"
29 patches = extraPatches;
32 nativeBuildInputs = [ python3 ];
33 buildInputs = [ bzip2 zlib gmp boost ]
34 ++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
38 python configure.py --prefix=$out --with-bzip2 --with-zlib ${extraConfigureFlags}${lib.optionalString stdenv.cc.isClang " --cc=clang"} ${lib.optionalString stdenv.hostPlatform.isAarch64 " --cpu=aarch64"}
42 enableParallelBuilding = true;
45 if [ -d src/scripts ]; then
46 patchShebangs src/scripts
51 cd "$out"/lib/pkgconfig
52 ln -s botan-*.pc botan.pc || true
58 description = "Cryptographic algorithms library";
59 maintainers = with maintainers; [ raskin thillux ];
60 platforms = platforms.unix;
61 license = licenses.bsd2;
63 inherit knownVulnerabilities;
65 passthru.updateInfo.downloadPage = "http://files.randombit.net/botan/";