Merge pull request #120214 from dotlambda/sc-im-xlsx

This commit is contained in:
Sandro 2021-04-23 01:01:52 +02:00 committed by GitHub
commit 603620a630
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 63 additions and 0 deletions

View File

@ -1,12 +1,14 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, makeWrapper , makeWrapper
, pkg-config , pkg-config
, which , which
, bison , bison
, gnuplot , gnuplot
, libxls , libxls
, libxlsxwriter
, libxml2 , libxml2
, libzip , libzip
, ncurses , ncurses
@ -25,6 +27,18 @@ stdenv.mkDerivation rec {
sourceRoot = "${src.name}/src"; sourceRoot = "${src.name}/src";
patches = [
# libxls and libxlsxwriter are not found without the patch
# https://github.com/andmarti1424/sc-im/pull/542
(fetchpatch {
name = "use-pkg-config-for-libxls-and-libxlsxwriter.patch";
url = "https://github.com/andmarti1424/sc-im/commit/b62dc25eb808e18a8ab7ee7d8eb290e34efeb075.patch";
sha256 = "1yn32ps74ngzg3rbkqf8dn0g19jv4xhxrfgx9agnywf0x8gbwjh3";
})
];
patchFlags = [ "-p2" ];
nativeBuildInputs = [ nativeBuildInputs = [
makeWrapper makeWrapper
pkg-config pkg-config
@ -35,6 +49,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
gnuplot gnuplot
libxls libxls
libxlsxwriter
libxml2 libxml2
libzip libzip
ncurses ncurses

View File

@ -0,0 +1,46 @@
{ lib
, stdenv
, fetchFromGitHub
, minizip
, python3
, zlib
}:
stdenv.mkDerivation rec {
pname = "libxlsxwriter";
version = "1.0.3";
src = fetchFromGitHub {
owner = "jmcnamara";
repo = "libxlsxwriter";
rev = "RELEASE_${version}";
sha256 = "14c5rgx87nhzasr0j7mcfr1w7ifz0gmdiqy2xq59di5xvcdrpxpv";
};
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;
};
}

View File

@ -16358,6 +16358,8 @@ in
libxls = callPackage ../development/libraries/libxls { }; libxls = callPackage ../development/libraries/libxls { };
libxlsxwriter = callPackage ../development/libraries/libxlsxwriter { };
libxmi = callPackage ../development/libraries/libxmi { }; libxmi = callPackage ../development/libraries/libxmi { };
libxml2 = callPackage ../development/libraries/libxml2 { libxml2 = callPackage ../development/libraries/libxml2 {