1 { lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, autoconf, automake, openssl, libgsf, gmp }:
3 stdenv.mkDerivation rec {
8 src = fetchFromGitHub {
9 owner = "GavinSmith0123";
10 repo = "crackxls2003";
12 sha256 = "0q5jl7hcds3f0rhly3iy4fhhbyh9cdrfaw7zdrazzf1wswwhyssz";
16 # Pull patch pending upstream inclusion for -fno-common support:
17 # https://github.com/GavinSmith0123/crackxls2003/pull/3
19 name = "fno-common.patch";
20 url = "https://github.com/GavinSmith0123/crackxls2003/commit/613d6c1844f76c7b67671aaa265375fed56c2a56.patch";
21 sha256 = "1pk67x67d9wji576mc57z5bzqlf9ygvn9m1z47w12mad7qmj9h1n";
25 nativeBuildInputs = [ pkg-config autoconf automake ];
26 buildInputs = [ openssl libgsf gmp ];
28 # Avoid "-O5 -march=native"
29 makeFlags = [ "OPTIM_FLAGS=" ];
34 cp crackxls2003 $out/bin/
38 homepage = "https://github.com/GavinSmith0123/crackxls2003/";
39 description = "Used to break the encryption on old Microsoft Excel and Microsoft Word files";
40 mainProgram = "crackxls2003";
41 platforms = platforms.linux;
42 license = licenses.gpl3;