From 98f6d2d5c43f4318ab89c9db676aa2856c56bdf0 Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 23 Jan 2024 09:55:42 +0100 Subject: [PATCH] bkcrack: 1.6.0 -> 1.6.1 --- pkgs/tools/security/bkcrack/default.nix | 26 +++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/security/bkcrack/default.nix b/pkgs/tools/security/bkcrack/default.nix index 6345cbdc9602..afc18759c78d 100644 --- a/pkgs/tools/security/bkcrack/default.nix +++ b/pkgs/tools/security/bkcrack/default.nix @@ -2,33 +2,43 @@ , stdenv , fetchFromGitHub , cmake +, nix-update-script }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "bkcrack"; - version = "1.6.0"; + version = "1.6.1"; src = fetchFromGitHub { owner = "kimci86"; - repo = pname; - rev = "v${version}"; - hash = "sha256-VfPRX9lOPyen8CujiBtTCbD5e7xd9X2OQ1uZ6JWKwtY="; + 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/licenses/bkcrack + 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 - rm -r $out/example $out/tools $out/readme.md + 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"; }; -} +})