chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / sa / samdump2 / package.nix
bloba1a045af7664fed8d7c6556d7ed8b14849b453c5
1 { lib
2 , stdenv
3 , fetchurl
4 , fetchpatch
5 , openssl
6 , pkg-config
7 , which
8 }:
10 stdenv.mkDerivation (finalAttrs: {
11   pname = "samdump2";
12   version = "3.0.0";
14   src = fetchurl {
15     url = "mirror://sourceforge/project/ophcrack/samdump2/${finalAttrs.version}/samdump2-${finalAttrs.version}.tar.bz2";
16     hash = "sha256-YCZZrzDFZXUPoBZQ4KIj0mNVtd+Y8vvDDjpsWT7U5SY=";
17   };
19   nativeBuildInputs = [ pkg-config which ];
20   buildInputs = [
21     openssl
22   ];
24   patches = [
25     (fetchpatch {
26       # fixes a FTBFS linker bug
27       url = "https://salsa.debian.org/pkg-security-team/samdump2/-/raw/b4c9f14f5a1925106e7c62c9967d430c1104df0c/debian/patches/10_ftbfs_link.patch";
28       hash = "sha256-TGzxi44dDAispG+rK/kYYMzKjt10p+ZyfVDWKG+Gw/s=";
29     })
30     (fetchpatch {
31       # the makefile overrides flags so you can't set them via d/rules or the environment
32       url = "https://salsa.debian.org/pkg-security-team/samdump2/-/raw/b4c9f14f5a1925106e7c62c9967d430c1104df0c/debian/patches/20_compiler_flags.patch";
33       hash = "sha256-VdDiNAQhlauAB4Ws/pvWMJY2rMKr3qhyVGX2GoxaagI=";
34     })
35     (fetchpatch {
36       # the makefile has a infos dep, but no target
37       url = "https://salsa.debian.org/pkg-security-team/samdump2/-/raw/b4c9f14f5a1925106e7c62c9967d430c1104df0c/debian/patches/30_install_infos.patch";
38       hash = "sha256-Y7kdU+ywUYFm2VySGFa0QE1OvzoTa0eFSWp0VFmY5iM=";
39     })
40     (fetchpatch {
41       # change the formatting in the manpage to make it more readable
42       url = "https://salsa.debian.org/pkg-security-team/samdump2/-/raw/b4c9f14f5a1925106e7c62c9967d430c1104df0c/debian/patches/40_manpage_formatting.patch";
43       hash = "sha256-L4BjtiGk91nTKZdr0SXbaxkD2mzmkU3UJlc4TZfXS4Y=";
44     })
45     (fetchpatch {
46       # fix a FTBFS with OpenSSL 1.1.0. (Closes: #828537)
47       url = "https://salsa.debian.org/pkg-security-team/samdump2/-/raw/b4c9f14f5a1925106e7c62c9967d430c1104df0c/debian/patches/50_openssl.patch";
48       hash = "sha256-pdLOSt7kX9uPg4wDVstxh3NC/DboQCP+5/wCjuJmruY=";
49     })
50   ];
52   postPatch = ''
53     substituteInPlace Makefile \
54       --replace " -o root -g root" ""
55   '';
57   makeFlags = [
58     "PREFIX=$(out)"
59     "CC=cc"
60   ];
62   meta = with lib; {
63     description = "Dump password hashes from a Windows NT/2k/XP installation";
64     mainProgram = "samdump2";
65     homepage = "https://sourceforge.net/projects/ophcrack/files/samdump2";
66     license =  licenses.gpl2Plus;
67     maintainers = with maintainers; [ d3vil0p3r ];
68     platforms = platforms.unix;
69   };