nixpkgs/pkgs/tools/security/bkcrack/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

2022-11-11 22:38:05 +01:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
2024-01-23 09:55:42 +01:00
, nix-update-script
2022-11-11 22:38:05 +01:00
}:
2024-01-23 09:55:42 +01:00
stdenv.mkDerivation (finalAttrs: {
2022-11-11 22:38:05 +01:00
pname = "bkcrack";
2024-01-23 09:55:42 +01:00
version = "1.6.1";
2022-11-11 22:38:05 +01:00
src = fetchFromGitHub {
owner = "kimci86";
2024-01-23 09:55:42 +01:00
repo = "bkcrack";
rev = "v${finalAttrs.version}";
hash = "sha256-x7JK7+DcD2uSWZRTJQPGCcF2mHBlu6FwYUbuYzbvD+s=";
2022-11-11 22:38:05 +01:00
};
2024-01-23 09:55:42 +01:00
passthru.updateScript = nix-update-script { };
2022-11-11 22:38:05 +01:00
nativeBuildInputs = [ cmake ];
2024-01-23 09:55:42 +01:00
cmakeFlags = [
"-DBKCRACK_BUILD_TESTING=${if finalAttrs.doCheck then "ON" else "OFF"}"
];
2022-11-11 22:38:05 +01:00
postInstall = ''
2024-01-23 09:55:42 +01:00
mkdir -p $out/bin $out/share/doc/bkcrack $out/share/licenses/bkcrack
2022-11-11 22:38:05 +01:00
mv $out/bkcrack $out/bin/
mv $out/license.txt $out/share/licenses/bkcrack
2024-01-23 09:55:42 +01:00
mv $out/example $out/tools $out/readme.md $out/share/doc/bkcrack
2022-11-11 22:38:05 +01:00
'';
2024-01-23 09:55:42 +01:00
doCheck = true;
2022-11-11 22:38:05 +01:00
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 ];
2024-01-23 09:55:42 +01:00
mainProgram = "bkcrack";
2022-11-11 22:38:05 +01:00
};
2024-01-23 09:55:42 +01:00
})