about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libtomcrypt
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libtomcrypt')
-rw-r--r--nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix b/nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix
new file mode 100644
index 000000000000..f9e7f9684bac
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libtomcrypt/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, libtool }:
+
+stdenv.mkDerivation rec {
+  name = "libtomcrypt-${version}";
+  version = "1.18.2";
+
+  src = fetchurl {
+    url = "https://github.com/libtom/libtomcrypt/releases/download/v${version}/crypt-${version}.tar.xz";
+    sha256 = "113vfrgapyv72lalhd3nkw7jnks8az0gcb5wqn9hj19nhcxlrbcn";
+  };
+
+  nativeBuildInputs = [ libtool ];
+
+  postPatch = ''
+    substituteInPlace makefile.shared --replace "LT:=glibtool" "LT:=libtool"
+  '';
+
+  preBuild = ''
+    makeFlagsArray=(PREFIX=$out \
+      INSTALL_GROUP=$(id -g) \
+      INSTALL_USER=$(id -u))
+  '';
+
+  makefile = "makefile.shared";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://www.libtom.net/LibTomCrypt/;
+    description = "A fairly comprehensive, modular and portable cryptographic toolkit";
+    license = with licenses; [ publicDomain wtfpl ];
+    platforms = platforms.linux;
+  };
+}