Merge pull request #116975 from r-ryantm/auto-update/sc-im

This commit is contained in:
Sandro 2021-03-27 02:19:38 +01:00 committed by GitHub
commit fade4a904c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,43 +1,71 @@
{ lib, stdenv, fetchFromGitHub, yacc, ncurses, libxml2, libzip, libxls, pkg-config }: { lib
, stdenv
, fetchFromGitHub
, fetchpatch
, makeWrapper
, pkg-config
, which
, yacc
, gnuplot
, libxls
, libxml2
, libzip
, ncurses
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "0.7.0";
pname = "sc-im"; pname = "sc-im";
version = "0.8.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "andmarti1424"; owner = "andmarti1424";
repo = "sc-im"; repo = "sc-im";
rev = "v${version}"; rev = "v${version}";
sha256 = "0xi0n9qzby012y2j7hg4fgcwyly698sfi4i9gkvy0q682jihprbk"; sha256 = "sha256-/eG2BdkyfEGoSzPu6jT+Bn1RZTGT1D3etGj1tYchm1M=";
}; };
nativeBuildInputs = [ pkg-config ]; sourceRoot = "${src.name}/src";
buildInputs = [ yacc ncurses libxml2 libzip libxls ];
buildPhase = '' # make default colors readable on dark background
cd src patches = [
(fetchpatch {
url = "https://github.com/andmarti1424/sc-im/commit/78d2fdaaf2c578691e68fb5bd773803cb967ddba.patch";
sha256 = "09716zsqa9qdsj2qpkji8wlzsmp9gl66ggvrg7lmrwwnvli2zn2w";
})
(fetchpatch {
url = "https://github.com/andmarti1424/sc-im/commit/f29d6605c8170febcec0dea7bda9613bee3b7011.patch";
sha256 = "1zs1sb23g0k6lig4d0qdzq1wdhcdzl424ch567zyjl191lyhsjyg";
})
];
sed 's/LDLIBS += -lm/& -lncurses/' -i Makefile patchFlags = [ "-p2" ];
sed -e "\|^prefix = /usr/local| s|/usr/local|$out|" \ nativeBuildInputs = [
-e "\|^#LDLIBS += -lxlsreader| s|^#|| " \ makeWrapper
-e "\|^#CFLAGS += -DXLS| s|^#|| " \ pkg-config
-i Makefile which
yacc
];
make buildInputs = [
export DESTDIR=$out gnuplot
''; libxls
libxml2
libzip
ncurses
];
installPhase = '' makeFlags = [ "prefix=${placeholder "out"}" ];
make install prefix=
postInstall = ''
wrapProgram "$out/bin/sc-im" --prefix PATH : "${lib.makeBinPath [ gnuplot ]}"
''; '';
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;
}; };
} }