Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, autoconf, automake, openssl, libgsf, gmp }: 2 3stdenv.mkDerivation rec { 4 5 pname = "crackxls"; 6 version = "0.4"; 7 8 src = fetchFromGitHub { 9 owner = "GavinSmith0123"; 10 repo = "crackxls2003"; 11 rev = "v${version}"; 12 sha256 = "0q5jl7hcds3f0rhly3iy4fhhbyh9cdrfaw7zdrazzf1wswwhyssz"; 13 }; 14 15 patches = [ 16 # Pull patch pending upstream inclusion for -fno-common support: 17 # https://github.com/GavinSmith0123/crackxls2003/pull/3 18 (fetchpatch { 19 name = "fno-common.patch"; 20 url = "https://github.com/GavinSmith0123/crackxls2003/commit/613d6c1844f76c7b67671aaa265375fed56c2a56.patch"; 21 sha256 = "1pk67x67d9wji576mc57z5bzqlf9ygvn9m1z47w12mad7qmj9h1n"; 22 }) 23 ]; 24 25 nativeBuildInputs = [ pkg-config autoconf automake ]; 26 buildInputs = [ openssl libgsf gmp ]; 27 28 # Avoid "-O5 -march=native" 29 makeFlags = [ "OPTIM_FLAGS=" ]; 30 31 installPhase = 32 '' 33 mkdir -p $out/bin 34 cp crackxls2003 $out/bin/ 35 ''; 36 37 meta = with lib; { 38 homepage = "https://github.com/GavinSmith0123/crackxls2003/"; 39 description = "Used to break the encryption on old Microsoft Excel and Microsoft Word files"; 40 platforms = platforms.linux; 41 license = licenses.gpl3; 42 }; 43}