sc-im: modernize expression and support gnuplot
This commit is contained in:
parent
08a7427ee1
commit
49f8234fb4
|
@ -1,8 +1,20 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, yacc, ncurses, libxml2, libzip, libxls, pkg-config }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, makeWrapper
|
||||||
|
, pkg-config
|
||||||
|
, which
|
||||||
|
, yacc
|
||||||
|
, gnuplot
|
||||||
|
, libxls
|
||||||
|
, libxml2
|
||||||
|
, libzip
|
||||||
|
, ncurses
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.8.0";
|
|
||||||
pname = "sc-im";
|
pname = "sc-im";
|
||||||
|
version = "0.8.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "andmarti1424";
|
owner = "andmarti1424";
|
||||||
|
@ -11,33 +23,34 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-/eG2BdkyfEGoSzPu6jT+Bn1RZTGT1D3etGj1tYchm1M=";
|
sha256 = "sha256-/eG2BdkyfEGoSzPu6jT+Bn1RZTGT1D3etGj1tYchm1M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
sourceRoot = "${src.name}/src";
|
||||||
buildInputs = [ yacc ncurses libxml2 libzip libxls ];
|
|
||||||
|
|
||||||
buildPhase = ''
|
nativeBuildInputs = [
|
||||||
cd src
|
makeWrapper
|
||||||
|
pkg-config
|
||||||
|
which
|
||||||
|
yacc
|
||||||
|
];
|
||||||
|
|
||||||
sed 's/LDLIBS += -lm/& -lncurses/' -i Makefile
|
buildInputs = [
|
||||||
|
gnuplot
|
||||||
|
libxls
|
||||||
|
libxml2
|
||||||
|
libzip
|
||||||
|
ncurses
|
||||||
|
];
|
||||||
|
|
||||||
sed -e "\|^prefix = /usr/local| s|/usr/local|$out|" \
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
||||||
-e "\|^#LDLIBS += -lxlsreader| s|^#|| " \
|
|
||||||
-e "\|^#CFLAGS += -DXLS| s|^#|| " \
|
|
||||||
-i Makefile
|
|
||||||
|
|
||||||
make
|
postInstall = ''
|
||||||
export DESTDIR=$out
|
wrapProgram "$out/bin/sc-im" --prefix PATH : "${lib.makeBinPath [ gnuplot ]}"
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
make install prefix=
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/andmarti1424/sc-im";
|
homepage = "https://github.com/andmarti1424/sc-im";
|
||||||
description = "SC-IM - Spreadsheet Calculator Improvised - SC fork";
|
description = "An ncurses spreadsheet program for terminal";
|
||||||
license = licenses.bsdOriginal;
|
license = licenses.bsdOriginal;
|
||||||
maintainers = [ ];
|
maintainers = with maintainers; [ dotlambda ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue