nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5}:
6
7stdenv.mkDerivation (finalAttrs: {
8 pname = "zip2hashcat";
9 version = "1.0";
10
11 src = fetchFromGitHub {
12 owner = "hashstation";
13 repo = "zip2hashcat";
14 # Upstream 1.0 tag has no content
15 rev = "462bd94ea30d69a0810ca9bb3d056aa0f5393d57";
16 hash = "sha256-+hbDTGSDUxA7M8gBI/TViJ2ZvheNxlonYC/aFLvgPW8=";
17 };
18
19 buildPhase = ''
20 runHook preBuild
21
22 $CC zip2hashcat.c -o zip2hashcat
23
24 runHook postBuild
25 '';
26
27 installPhase = ''
28 runHook preInstall
29
30 mkdir -p $out/bin
31 mv zip2hashcat $out/bin/zip2hashcat
32
33 runHook postInstall
34 '';
35
36 meta = {
37 description = "Processes input ZIP files into a format suitable for use with hashcat";
38 homepage = "https://github.com/hashstation/zip2hashcat";
39 license = lib.licenses.mit;
40 changelog = "https://github.com/hashstation/zip2hashcat/releases/tag/${finalAttrs.version}";
41 maintainers = with lib.maintainers; [ pyrox0 ];
42 mainProgram = "zip2hashcat";
43 platforms = lib.platforms.all;
44 };
45})