mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-18 02:44:30 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, nix-update-script
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "bkcrack";
|
|
version = "1.7.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "kimci86";
|
|
repo = "bkcrack";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-smDmnqmYuFT3ip3ULQfiiF5YxkwzPwPYBujqq9GUyMs=";
|
|
};
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
cmakeFlags = [
|
|
"-DBKCRACK_BUILD_TESTING=${if finalAttrs.finalPackage.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";
|
|
};
|
|
})
|