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