11 static ? stdenv.hostPlatform.isStatic, # generates static libraries *only*
21 stdenv.mkDerivation (finalAttrs: {
25 __structuredAttrs = true;
26 enableParallelBuilding = true;
38 url = "http://botan.randombit.net/releases/Botan-${finalAttrs.version}.tar.xz";
54 ++ lib.optionals stdenv.hostPlatform.isDarwin (
55 with darwin.apple_sdk.frameworks;
61 ++ lib.optionals (lib.versionAtLeast version "3.6.0") [
67 ++ lib.optionals finalAttrs.doCheck [ "tests" ]
68 ++ lib.optionals static [ "static" ]
69 ++ lib.optionals (!static) [ "shared" ];
73 "--prefix=${placeholder "out"}"
74 "--bindir=${placeholder "bin"}/bin"
75 "--docdir=${placeholder "doc"}/share/doc"
76 "--mandir=${placeholder "man"}/share/man"
77 "--no-install-python-module"
78 "--build-targets=${lib.concatStringsSep "," finalAttrs.buildTargets}"
82 "--cpu=${stdenv.hostPlatform.parsed.cpu.name}"
84 ++ lib.optionals stdenv.cc.isClang [
87 ++ lib.optionals (lib.versionAtLeast version "3.6.0") [
88 "--enable-modules=jitter_rng"
93 python configure.py ''${botanConfigureFlags[@]}
98 if [ -d src/scripts ]; then
99 patchShebangs src/scripts
104 cd "$out"/lib/pkgconfig
105 ln -s botan-*.pc botan.pc || true
111 description = "Cryptographic algorithms library";
112 homepage = "https://botan.randombit.net";
113 mainProgram = "botan";
114 maintainers = with maintainers; [
118 platforms = platforms.unix;
119 license = licenses.bsd2;
126 hash = "sha256-fLhXXYjSMsdxdHadf54ku0REQWBYWYbuvWbnScuakIk=";
131 hash = "sha256-3+6g4KbybWckxK8B2pp7iEh62y2Bunxy/K9S21IsmtQ=";