From a92dc4eae1eac493f8161e860acbd935afecd7e9 Mon Sep 17 00:00:00 2001 From: c0bw3b Date: Wed, 8 Nov 2017 23:04:09 +0100 Subject: [PATCH] libtomcrypt: 1.17 -> 1.18.0 --- .../libraries/libtomcrypt/default.nix | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/libtomcrypt/default.nix b/pkgs/development/libraries/libtomcrypt/default.nix index 13fa71e60dce..46f3a982b0c7 100644 --- a/pkgs/development/libraries/libtomcrypt/default.nix +++ b/pkgs/development/libraries/libtomcrypt/default.nix @@ -1,27 +1,34 @@ -{stdenv, fetchurl, libtool}: +{ stdenv, fetchurl, libtool }: -stdenv.mkDerivation { - name = "libtomcrypt-1.17"; +stdenv.mkDerivation rec { + name = "libtomcrypt-${version}"; + version = "1.18.0"; src = fetchurl { - url = "https://github.com/libtom/libtomcrypt/releases/download/1.17/crypt-1.17.tar.bz2"; - sha256 = "e33b47d77a495091c8703175a25c8228aff043140b2554c08a3c3cd71f79d116"; + url = "https://github.com/libtom/libtomcrypt/releases/download/v${version}/crypt-${version}.tar.xz"; + sha256 = "0ymqi0zf5gzn8pq4mnylwgg6pskml2v1p9rsjrqspyja65mgb7fs"; }; - buildInputs = [libtool]; + nativeBuildInputs = [ libtool ]; + + postPatch = '' + substituteInPlace makefile.shared --replace "LT:=glibtool" "LT:=libtool" + ''; preBuild = '' - makeFlagsArray=(LIBPATH=$out/lib INCPATH=$out/include \ - DATAPATH=$out/share/doc/libtomcrypt/pdf \ + makeFlagsArray=(PREFIX=$out \ INSTALL_GROUP=$(id -g) \ INSTALL_USER=$(id -u)) ''; makefile = "makefile.shared"; - meta = { - homepage = http://libtom.org/?page=features&newsitems=5&whatfile=crypt; + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = http://www.libtom.net/LibTomCrypt/; description = "A fairly comprehensive, modular and portable cryptographic toolkit"; - platforms = stdenv.lib.platforms.linux; + license = with licenses; [ publicDomain wtfpl ]; + platforms = platforms.linux; }; }