2021-04-22 14:11:52 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-11-11 21:18:40 +00:00
|
|
|
, fetchpatch
|
2021-04-22 14:11:52 +01:00
|
|
|
, minizip
|
|
|
|
, python3
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libxlsxwriter";
|
2021-11-11 21:18:40 +00:00
|
|
|
version = "1.1.4";
|
2021-04-22 14:11:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jmcnamara";
|
|
|
|
repo = "libxlsxwriter";
|
|
|
|
rev = "RELEASE_${version}";
|
2021-11-11 21:18:40 +00:00
|
|
|
sha256 = "sha256-Ef1CipwUEJW/VYx/q98lN0PSxj8c3DbIuql8qU6mTRs=";
|
2021-04-22 14:11:52 +01:00
|
|
|
};
|
|
|
|
|
2021-11-11 21:18:40 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/jmcnamara/libxlsxwriter/pull/357
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/jmcnamara/libxlsxwriter/commit/723629976ede5e6ec9b03ef970381fed06ef95f0.patch";
|
|
|
|
sha256 = "14aw698b5svvbhvadc2vr71isck3k02zdv8xjsa7c33n8331h20g";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-04-22 14:11:52 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3.pkgs.pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
minizip
|
|
|
|
zlib
|
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=${placeholder "out"}"
|
|
|
|
"USE_SYSTEM_MINIZIP=1"
|
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkTarget = "test";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "C library for creating Excel XLSX files";
|
|
|
|
homepage = "https://libxlsxwriter.github.io/";
|
|
|
|
changelog = "https://github.com/jmcnamara/libxlsxwriter/blob/${src.rev}/Changes.txt";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|