1{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, autoconf-archive }:
2
3stdenv.mkDerivation rec {
4 pname = "libxls";
5 version = "1.6.2";
6
7 src = fetchFromGitHub {
8 owner = "libxls";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-vjmYByk+IDBon8xGR1+oNaEQTiJK+IVpDXsG1IyVNoY=";
12 };
13
14 patches = [
15 # Fix cross-compilation
16 (fetchpatch {
17 url = "https://github.com/libxls/libxls/commit/007e63c1f5e19bc73292f267c85d7dd14e9ecb38.patch";
18 sha256 = "sha256-PjPHuXth4Yaq9nVfk5MYJMRo5B0R6YA1KEqgwfjF3PM=";
19 })
20 ];
21
22 nativeBuildInputs = [ autoreconfHook autoconf-archive ];
23
24 enableParallelBuilding = true;
25
26 meta = with lib; {
27 description = "Extract Cell Data From Excel xls files";
28 homepage = "https://github.com/libxls/libxls";
29 license = licenses.bsd2;
30 maintainers = with maintainers; [ abbradar ];
31 mainProgram = "xls2csv";
32 platforms = platforms.unix;
33 knownVulnerabilities = [
34 "CVE-2023-38851"
35 "CVE-2023-38852"
36 "CVE-2023-38853"
37 "CVE-2023-38854"
38 "CVE-2023-38855"
39 "CVE-2023-38856"
40 ];
41 };
42}