summary refs log tree commit diff
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2017-11-11 18:11:14 +0100
committerGitHub <noreply@github.com>2017-11-11 18:11:14 +0100
commit3b647d7bbd534c22486ac544b1ead0fa378f9f04 (patch)
tree1ad73ea26d44cfd86f34463d8448b7334f2e8a2e
parent0f144feb31baaea7f100cf21e606b16b60b84ea2 (diff)
parenta92dc4eae1eac493f8161e860acbd935afecd7e9 (diff)
downloadnixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.tar
nixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.tar.gz
nixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.tar.bz2
nixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.tar.lz
nixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.tar.xz
nixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.tar.zst
nixlib-3b647d7bbd534c22486ac544b1ead0fa378f9f04.zip
Merge pull request #31376 from c0bw3b/pkg/libtom
libtom{crypt,math}: update to 1.18.0 and 1.0.1 resp.
-rw-r--r--pkgs/development/libraries/libtomcrypt/default.nix29
-rw-r--r--pkgs/development/libraries/libtommath/default.nix32
2 files changed, 38 insertions, 23 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;
   };
 }
diff --git a/pkgs/development/libraries/libtommath/default.nix b/pkgs/development/libraries/libtommath/default.nix
index 8b7c06b98dca..cd13eef156d0 100644
--- a/pkgs/development/libraries/libtommath/default.nix
+++ b/pkgs/development/libraries/libtommath/default.nix
@@ -1,27 +1,35 @@
-{stdenv, fetchurl, libtool}:
+{ stdenv, fetchurl, libtool }:
+
+stdenv.mkDerivation rec {
+  name = "libtommath-${version}";
+  version = "1.0.1";
 
-stdenv.mkDerivation {
-  name = "libtommath-1.0";
-  
   src = fetchurl {
-    url = https://github.com/libtom/libtommath/releases/download/v1.0/ltm-1.0.tar.xz;
-    sha256 = "0v5mpd8zqjfs2hr900w1mxifz23xylyjdqyx1i1wl7q9xvwpsflr";
+    url = "https://github.com/libtom/libtommath/releases/download/v${version}/ltm-${version}.tar.xz";
+    sha256 = "0sbccdwbkfc680id2fi0x067j23biqcjqilwkk7y9339knrjy0s7";
   };
 
-  buildInputs = [libtool];
+  nativeBuildInputs = [ libtool ];
+
+  postPatch = ''
+    substituteInPlace makefile.shared --replace "LT:=glibtool" "LT:=libtool"
+    substituteInPlace makefile_include.mk --replace "shell arch" "shell uname -m"
+  '';
 
   preBuild = ''
-    makeFlagsArray=(LIBPATH=$out/lib INCPATH=$out/include \
-      DATAPATH=$out/share/doc/libtommath/pdf \
+    makeFlagsArray=(PREFIX=$out \
       INSTALL_GROUP=$(id -g) \
       INSTALL_USER=$(id -u))
   '';
 
   makefile = "makefile.shared";
 
-  meta = {
-    homepage = http://math.libtomcrypt.com/;
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = http://www.libtom.net/LibTomMath/;
     description = "A library for integer-based number-theoretic applications";
-    platforms = stdenv.lib.platforms.unix;
+    license = with licenses; [ publicDomain wtfpl ];
+    platforms = platforms.unix;
   };
 }