3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/sc-im/default.nix

44 lines
1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, yacc, ncurses, libxml2, libzip, libxls, pkg-config }:
2015-03-01 13:37:28 +00:00
stdenv.mkDerivation rec {
2018-02-21 13:16:13 +00:00
version = "0.7.0";
pname = "sc-im";
2015-03-01 13:37:28 +00:00
src = fetchFromGitHub {
owner = "andmarti1424";
repo = "sc-im";
rev = "v${version}";
2018-02-21 13:16:13 +00:00
sha256 = "0xi0n9qzby012y2j7hg4fgcwyly698sfi4i9gkvy0q682jihprbk";
2015-03-01 13:37:28 +00:00
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ yacc ncurses libxml2 libzip libxls ];
2015-03-01 13:37:28 +00:00
buildPhase = ''
cd src
2018-02-21 13:16:13 +00:00
sed 's/LDLIBS += -lm/& -lncurses/' -i Makefile
sed -e "\|^prefix = /usr/local| s|/usr/local|$out|" \
-e "\|^#LDLIBS += -lxlsreader| s|^#|| " \
-e "\|^#CFLAGS += -DXLS| s|^#|| " \
-i Makefile
2015-03-01 13:37:28 +00:00
make
export DESTDIR=$out
'';
installPhase = ''
make install prefix=
'';
meta = with lib; {
homepage = "https://github.com/andmarti1424/sc-im";
description = "SC-IM - Spreadsheet Calculator Improvised - SC fork";
license = licenses.bsdOriginal;
maintainers = [ ];
platforms = platforms.unix;
2015-03-01 13:37:28 +00:00
};
}