Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / op / ophcrack-cli / package.nix
blobbbc7b8e1997888a8f32fabf95b9f95438b00ca1a
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , autoreconfHook
6 , libtool
7 , zlib
8 , pkg-config
9 , openssl
10 , freetype
11 , expat
14 stdenv.mkDerivation rec {
15   pname = "ophcrack";
16   version = "3.8.0";
18   src = fetchurl {
19     url = "https://sourceforge.net/projects/ophcrack/files/ophcrack/3.8.0/ophcrack-3.8.0.tar.bz2";
20     hash = "sha256-BIpt9XmDo6WjGsfE7BLfFqpJ5lKilnbZPU75WdUK7uA=";
21   };
23   nativeBuildInputs = [
24     autoreconfHook
25     libtool
26     expat
27   ];
29   buildInputs = [
30     zlib
31     openssl
32     freetype
33     pkg-config
34   ];
36   patches = [
37     (fetchpatch {
38       url = "https://salsa.debian.org/pkg-security-team/ophcrack/-/raw/c60118b40802e1162dcebfe5f881cf973b2334d3/debian/patches/fix_spelling_error.diff";
39       hash = "sha256-Fc044hTU4Mtdym+HukGAwGzaLm7aVzV9KpvHvFUG2Sc=";
40     })
41     (fetchpatch {
42       url = "https://salsa.debian.org/pkg-security-team/ophcrack/-/raw/e19d993a7dbf131d13128366e2aac270a685befc/debian/patches/qmake_crossbuild.diff";
43       hash = "sha256-sOKXOBpAYGLacU6IxjRzy3HCnGm4DFowDL2qP+DzG8M=";
44     })
45   ];
47   configureFlags = [
48     "--with-libssl=yes"
49     "--disable-gui"
50   ];
52   buildPhase = ''
53     runHook preBuild
55     make
57     runHook postBuild
58   '';
60   postInstall = ''
61     mv $out/bin/ophcrack $out/bin/ophcrack-cli
62   '';
64   meta = with lib; {
65     description = "Free Windows password cracker based on rainbow tables";
66     homepage = "https://ophcrack.sourceforge.io";
67     license = with licenses; [ gpl2Plus ];
68     maintainers = with maintainers; [ tochiaha ];
69     mainProgram = "ophcrack-cli";
70     platforms = platforms.all;
71   };