10 stdenv.mkDerivation rec {
11 pname = "libtomcrypt";
15 url = "https://github.com/libtom/libtomcrypt/releases/download/v${version}/crypt-${version}.tar.xz";
16 sha256 = "113vfrgapyv72lalhd3nkw7jnks8az0gcb5wqn9hj19nhcxlrbcn";
21 name = "CVE-2019-17362.patch";
22 url = "https://github.com/libtom/libtomcrypt/pull/508/commits/25c26a3b7a9ad8192ccc923e15cf62bf0108ef94.patch";
23 sha256 = "1bwsj0pwffxw648wd713z3xcyrbxc2z646psrzp38ys564fjh5zf";
33 substituteInPlace makefile.shared --replace "LIBTOOL:=glibtool" "LIBTOOL:=libtool"
37 makeFlagsArray+=(PREFIX=$out \
38 CFLAGS="-DUSE_LTM -DLTM_DESC -DLTC_PTHREAD" \
39 EXTRALIBS=\"-ltommath\" \
40 INSTALL_GROUP=$(id -g) \
41 INSTALL_USER=$(id -u))
44 makefile = "makefile.shared";
46 enableParallelBuilding = true;
49 description = "Fairly comprehensive, modular and portable cryptographic toolkit";
50 homepage = "https://www.libtom.net/LibTomCrypt/";
51 changelog = "https://github.com/libtom/libtomcrypt/raw/v${version}/changes";
52 license = with licenses; [
57 platforms = platforms.all;