depot/third_party/nixpkgs/pkgs/tools/misc/hashpump/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

36 lines
844 B
Nix

{ stdenv, fetchFromGitHub, openssl, lib }:
stdenv.mkDerivation (finalAttrs: {
pname = "hashpump";
version = "1.2.0";
src = fetchFromGitHub {
owner = "bwall";
repo = "HashPump";
rev = "v${finalAttrs.version}";
hash = "sha256-xL/1os17agwFtdq0snS3ZJzwJhk22ujxfWLH65IMMEM=";
};
makeFlags = [ "INSTALLLOCATION=${placeholder "out"}/bin/" ];
buildInputs = [ openssl ];
doCheck = true;
checkPhase = ''
runHook preCheck
./hashpump --test
runHook postCheck
'';
preInstall = ''
mkdir -p $out/bin
'';
meta = {
description = "A tool to exploit the hash length extension attack in various hashing algorithms";
homepage = "https://github.com/bwall/HashPump";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ t4ccer ];
platforms = lib.platforms.linux;
};
})