summary refs log tree commit diff
path: root/pkgs/development/libraries/openssl/chacha.nix
diff options
context:
space:
mode:
authorCharles Strahan <charles.c.strahan@gmail.com>2016-02-02 18:02:31 -0500
committerCharles Strahan <charles.c.strahan@gmail.com>2016-02-03 12:01:24 -0500
commit4c57b932ab42be3f36663ceeb54df08dadc46f67 (patch)
tree3026c6092b2a68312afd81b3afa93d0a03b967f6 /pkgs/development/libraries/openssl/chacha.nix
parent9807acb3eeeff420a0645e54e147af3503124a46 (diff)
downloadnixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.tar
nixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.tar.gz
nixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.tar.bz2
nixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.tar.lz
nixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.tar.xz
nixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.tar.zst
nixlib-4c57b932ab42be3f36663ceeb54df08dadc46f67.zip
cipherscan: init at rev 18b0d1b (Dec 17, 2015)
CipherScan is a simple way to find out which SSL ciphersuites are
supported by a target.

It can take advantage of the extra features in Peter Mosmans' openssl
fork (which is also included in this commit).
Diffstat (limited to 'pkgs/development/libraries/openssl/chacha.nix')
-rw-r--r--pkgs/development/libraries/openssl/chacha.nix70
1 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/development/libraries/openssl/chacha.nix b/pkgs/development/libraries/openssl/chacha.nix
new file mode 100644
index 000000000000..b610f27d17cf
--- /dev/null
+++ b/pkgs/development/libraries/openssl/chacha.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchFromGitHub, perl, zlib
+, withCryptodev ? false, cryptodevHeaders
+}:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  name = "openssl-chacha-${version}";
+  version = "2016-01-27";
+
+  src = fetchFromGitHub {
+    owner = "PeterMosmans";
+    repo = "openssl";
+    rev = "4576ede5b08242bcd6749fc284c691ed177842b7";
+    sha256 = "1030rs4bdaysxbq0mmck1dn6g5adspzkwsrnhvv16b4ig0r4ncgj";
+  };
+
+  nativeBuildInputs = [ perl zlib ];
+  buildInputs = stdenv.lib.optional withCryptodev cryptodevHeaders;
+
+  configureScript = "./config";
+
+  configureFlags = [
+    "zlib"
+    "shared"
+    "experimental-jpake"
+    "enable-md2"
+    "enable-rc5"
+    "enable-rfc3779"
+    "enable-gost"
+    "--libdir=lib"
+    "--openssldir=etc/ssl"
+  ] ++ stdenv.lib.optionals withCryptodev [
+    "-DHAVE_CRYPTODEV"
+    "-DUSE_CRYPTODEV_DIGESTS"
+  ];
+
+  makeFlags = [
+    "MANDIR=$(out)/share/man"
+  ];
+
+  # Parallel building is broken in OpenSSL.
+  enableParallelBuilding = false;
+
+  postInstall = ''
+    # If we're building dynamic libraries, then don't install static
+    # libraries.
+    if [ -n "$(echo $out/lib/*.so $out/lib/*.dylib $out/lib/*.dll)" ]; then
+        rm "$out/lib/"*.a
+    fi
+
+    # remove dependency on Perl at runtime
+    rm -r $out/etc/ssl/misc $out/bin/c_rehash
+  '';
+
+  postFixup = ''
+    # Check to make sure we don't depend on perl
+    if grep -r '${perl}' $out; then
+      echo "Found an erroneous dependency on perl ^^^" >&2
+      exit 1
+    fi
+  '';
+
+  meta = {
+    homepage = http://www.openssl.org/;
+    description = "A cryptographic library that implements the SSL and TLS protocols";
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ stdenv.lib.maintainers.cstrahan ];
+    priority = 10; # resolves collision with ‘man-pages’
+  };
+}