depot/third_party/nixpkgs/pkgs/tools/security/bkcrack/default.nix
Default email c7cb07f092 Project import generated by Copybara.
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
2024-02-29 21:09:43 +01:00

44 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, nix-update-script
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bkcrack";
version = "1.6.1";
src = fetchFromGitHub {
owner = "kimci86";
repo = "bkcrack";
rev = "v${finalAttrs.version}";
hash = "sha256-x7JK7+DcD2uSWZRTJQPGCcF2mHBlu6FwYUbuYzbvD+s=";
};
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBKCRACK_BUILD_TESTING=${if finalAttrs.doCheck then "ON" else "OFF"}"
];
postInstall = ''
mkdir -p $out/bin $out/share/doc/bkcrack $out/share/licenses/bkcrack
mv $out/bkcrack $out/bin/
mv $out/license.txt $out/share/licenses/bkcrack
mv $out/example $out/tools $out/readme.md $out/share/doc/bkcrack
'';
doCheck = true;
meta = with lib; {
description = "Crack legacy zip encryption with Biham and Kocher's known plaintext attack";
homepage = "https://github.com/kimci86/bkcrack";
license = licenses.zlib;
platforms = platforms.unix;
maintainers = with maintainers; [ erdnaxe ];
mainProgram = "bkcrack";
};
})