1{ lib, stdenv, fetchFromGitHub, libtool, which }:
2
3stdenv.mkDerivation rec {
4 pname = "sha1collisiondetection";
5 version = "1.0.3";
6
7 src = fetchFromGitHub {
8 owner = "cr-marcstevens";
9 repo = "sha1collisiondetection";
10 rev = "stable-v${version}";
11 sha256 = "0xn31hkkqs0kj9203rzx6w4nr0lq8fnrlm5i76g0px3q4v2dzw1s";
12 };
13
14 makeFlags = [ "PREFIX=$(out)" ];
15
16 doCheck = true;
17
18 nativeBuildInputs = [ libtool which ];
19
20 meta = with lib; {
21 description = "Library and command line tool to detect SHA-1 collision";
22 longDescription = ''
23 This library and command line tool were designed as near drop-in
24 replacements for common SHA-1 libraries and sha1sum. They will
25 compute the SHA-1 hash of any given file and additionally will
26 detect cryptanalytic collision attacks against SHA-1 present in
27 each file. It is very fast and takes less than twice the amount
28 of time as regular SHA-1.
29 '';
30 platforms = platforms.all;
31 maintainers = with maintainers; [ leenaars ];
32 license = licenses.mit;
33 };
34}