3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/sc-im/default.nix
rbasso 4f531a1d2b sc-im: 0.4.0 -> 0.5.0
- Bump version to 0.5.0
- Enable support for reading '.xls' and '.xlsx' files.

The support for reading Excel files depends on:
  - libxml2, which was already a build input.
  - libzip
  - libxls
2017-03-16 20:45:00 +09:00

41 lines
1 KiB
Nix

{ stdenv, fetchFromGitHub, yacc, ncurses, libxml2, libzip, libxls, pkgconfig }:
stdenv.mkDerivation rec {
version = "0.5.0";
name = "sc-im-${version}";
src = fetchFromGitHub {
owner = "andmarti1424";
repo = "sc-im";
rev = "v${version}";
sha256 = "1vdn9p9srvdksxznrn65pfigwrd7brlq8bac3pjfqsvf8gjnzq61";
};
buildInputs = [ yacc ncurses libxml2 libzip libxls pkgconfig ];
buildPhase = ''
cd src
sed -e "\|^prefix = /usr/local| s|/usr/local|$out|" \
-e "\|^#LDLIBS += -lxlsreader| s|^#|| " \
-e "\|^#CFLAGS += -DXLS| s|^#|| " \
-i Makefile
make
export DESTDIR=$out
'';
installPhase = ''
make install prefix=
'';
meta = with stdenv.lib; {
homepage = "https://github.com/andmarti1424/sc-im";
description = "SC-IM - Spreadsheet Calculator Improvised - SC fork";
license = licenses.bsdOriginal;
maintainers = [ maintainers.matthiasbeyer ];
platforms = platforms.linux; # Cannot test others
};
}