2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, lib, fetchFromGitHub, openssl, makeWrapper, python, coreutils }:
|
2016-02-03 00:02:31 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "cipherscan";
|
2016-09-04 07:26:00 +02:00
|
|
|
version = "2016-08-16";
|
|
|
|
|
2016-02-03 00:02:31 +01:00
|
|
|
src = fetchFromGitHub {
|
2016-09-04 07:26:00 +02:00
|
|
|
owner = "mozilla";
|
2016-02-03 00:02:31 +01:00
|
|
|
repo = "cipherscan";
|
2016-09-04 07:26:00 +02:00
|
|
|
rev = "74dd82e8ad994a140daf79489d3bd1c5ad928d38";
|
|
|
|
sha256 = "16azhlmairnvdz7xmwgvfpn2pzw1p8z7c9b27m07fngqjkpx0mhh";
|
2016-02-03 00:02:31 +01:00
|
|
|
};
|
2016-09-04 07:26:00 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ python ];
|
|
|
|
|
2016-02-03 00:02:31 +01:00
|
|
|
buildPhase = ''
|
2016-09-04 07:26:00 +02:00
|
|
|
substituteInPlace cipherscan --replace '$0' 'cipherscan'
|
2016-02-03 00:02:31 +01:00
|
|
|
'';
|
2016-09-04 07:26:00 +02:00
|
|
|
|
2016-02-03 00:02:31 +01:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
cp cipherscan $out/bin
|
|
|
|
cp openssl.cnf $out/bin
|
2016-09-04 07:26:00 +02:00
|
|
|
cp analyze.py $out/bin/cipherscan-analyze
|
2016-02-03 00:02:31 +01:00
|
|
|
|
2016-09-04 07:26:00 +02:00
|
|
|
wrapProgram $out/bin/cipherscan \
|
|
|
|
--set NOAUTODETECT 1 \
|
|
|
|
--set TIMEOUTBIN "${coreutils}/bin/timeout" \
|
|
|
|
--set OPENSSLBIN "${openssl}/bin/openssl"
|
2016-02-03 00:02:31 +01:00
|
|
|
'';
|
2016-09-04 07:26:00 +02:00
|
|
|
|
2016-02-03 00:02:31 +01:00
|
|
|
meta = with lib; {
|
2016-09-04 07:26:00 +02:00
|
|
|
inherit (src.meta) homepage;
|
2016-02-03 00:02:31 +01:00
|
|
|
description = "Very simple way to find out which SSL ciphersuites are supported by a target";
|
2016-02-03 19:10:34 +01:00
|
|
|
license = licenses.mpl20;
|
2016-02-03 00:02:31 +01:00
|
|
|
platforms = platforms.all;
|
2016-09-04 07:26:00 +02:00
|
|
|
maintainers = with maintainers; [ cstrahan fpletz ];
|
2016-02-03 00:02:31 +01:00
|
|
|
};
|
|
|
|
}
|