diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-04-23 01:01:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 01:01:52 +0200 |
commit | 603620a6308c0c8f00f4edef67a6a0a41a3c6f36 (patch) | |
tree | cfc56a2b07e908efe7136f7f68693629c674667b /pkgs | |
parent | abb55ca1315f9a0dce5e3bce73d6e23e37f8b23a (diff) | |
parent | 22e898e946a26c742dd9bcd913f4149bb264ea74 (diff) |
Merge pull request #120214 from dotlambda/sc-im-xlsx
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/applications/misc/sc-im/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/libraries/libxlsxwriter/default.nix | 46 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/applications/misc/sc-im/default.nix b/pkgs/applications/misc/sc-im/default.nix index 9a05ac22afb8e..cc7d4c3771b4a 100644 --- a/pkgs/applications/misc/sc-im/default.nix +++ b/pkgs/applications/misc/sc-im/default.nix @@ -1,12 +1,14 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , makeWrapper , pkg-config , which , bison , gnuplot , libxls +, libxlsxwriter , libxml2 , libzip , ncurses @@ -25,6 +27,18 @@ stdenv.mkDerivation rec { 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 = [ makeWrapper pkg-config @@ -35,6 +49,7 @@ stdenv.mkDerivation rec { buildInputs = [ gnuplot libxls + libxlsxwriter libxml2 libzip ncurses diff --git a/pkgs/development/libraries/libxlsxwriter/default.nix b/pkgs/development/libraries/libxlsxwriter/default.nix new file mode 100644 index 0000000000000..849ebcf3c863c --- /dev/null +++ b/pkgs/development/libraries/libxlsxwriter/default.nix @@ -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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f02d24bd77c16..2d0ae69db6d6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16358,6 +16358,8 @@ in libxls = callPackage ../development/libraries/libxls { }; + libxlsxwriter = callPackage ../development/libraries/libxlsxwriter { }; + libxmi = callPackage ../development/libraries/libxmi { }; libxml2 = callPackage ../development/libraries/libxml2 { |