2021-03-20 11:35:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-03-20 12:59:02 +00:00
|
|
|
, fetchpatch
|
2021-03-20 11:35:55 +00:00
|
|
|
, makeWrapper
|
|
|
|
, pkg-config
|
|
|
|
, which
|
|
|
|
, yacc
|
|
|
|
, gnuplot
|
|
|
|
, libxls
|
|
|
|
, libxml2
|
|
|
|
, libzip
|
|
|
|
, ncurses
|
|
|
|
}:
|
2015-03-01 13:37:28 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "sc-im";
|
2021-03-20 11:35:55 +00:00
|
|
|
version = "0.8.0";
|
2015-03-01 13:37:28 +00:00
|
|
|
|
2016-02-07 13:42:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andmarti1424";
|
|
|
|
repo = "sc-im";
|
|
|
|
rev = "v${version}";
|
2021-03-19 21:39:08 +00:00
|
|
|
sha256 = "sha256-/eG2BdkyfEGoSzPu6jT+Bn1RZTGT1D3etGj1tYchm1M=";
|
2015-03-01 13:37:28 +00:00
|
|
|
};
|
|
|
|
|
2021-03-20 11:35:55 +00:00
|
|
|
sourceRoot = "${src.name}/src";
|
2015-03-01 13:37:28 +00:00
|
|
|
|
2021-03-20 12:59:02 +00:00
|
|
|
# make default colors readable on dark background
|
|
|
|
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";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = [ "-p2" ];
|
|
|
|
|
2021-03-20 11:35:55 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
which
|
|
|
|
yacc
|
|
|
|
];
|
2015-03-01 13:37:28 +00:00
|
|
|
|
2021-03-20 11:35:55 +00:00
|
|
|
buildInputs = [
|
|
|
|
gnuplot
|
|
|
|
libxls
|
|
|
|
libxml2
|
|
|
|
libzip
|
|
|
|
ncurses
|
|
|
|
];
|
2018-02-21 13:16:13 +00:00
|
|
|
|
2021-03-20 11:35:55 +00:00
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
2015-03-01 13:37:28 +00:00
|
|
|
|
2021-03-20 11:35:55 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/sc-im" --prefix PATH : "${lib.makeBinPath [ gnuplot ]}"
|
2015-03-01 13:37:28 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/andmarti1424/sc-im";
|
2021-03-20 11:35:55 +00:00
|
|
|
description = "An ncurses spreadsheet program for terminal";
|
2016-02-07 13:42:22 +00:00
|
|
|
license = licenses.bsdOriginal;
|
2021-03-20 11:35:55 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2018-05-23 16:49:02 +01:00
|
|
|
platforms = platforms.unix;
|
2015-03-01 13:37:28 +00:00
|
|
|
};
|
|
|
|
}
|