2021-03-20 12:35:55 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-04-22 15:49:26 +02:00
|
|
|
, fetchpatch
|
2021-03-20 12:35:55 +01:00
|
|
|
, makeWrapper
|
|
|
|
, pkg-config
|
|
|
|
, which
|
2021-03-14 18:50:12 +01:00
|
|
|
, bison
|
2021-03-20 12:35:55 +01:00
|
|
|
, gnuplot
|
|
|
|
, libxls
|
2021-04-22 15:49:26 +02:00
|
|
|
, libxlsxwriter
|
2021-03-20 12:35:55 +01:00
|
|
|
, libxml2
|
|
|
|
, libzip
|
|
|
|
, ncurses
|
|
|
|
}:
|
2015-03-01 14:37:28 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "sc-im";
|
2021-04-01 18:11:15 +02:00
|
|
|
version = "0.8.1";
|
2015-03-01 14:37:28 +01:00
|
|
|
|
2016-02-07 14:42:22 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "andmarti1424";
|
|
|
|
repo = "sc-im";
|
|
|
|
rev = "v${version}";
|
2021-04-01 18:11:15 +02:00
|
|
|
sha256 = "sha256-AIYa3d1ml1f5GNLKijeFPX+UabgEqzdXiP60BGvBPsQ=";
|
2015-03-01 14:37:28 +01:00
|
|
|
};
|
|
|
|
|
2021-03-20 12:35:55 +01:00
|
|
|
sourceRoot = "${src.name}/src";
|
2015-03-01 14:37:28 +01:00
|
|
|
|
2021-04-22 15:49:26 +02:00
|
|
|
patches = [
|
|
|
|
# libxls and libxlsxwriter are not found without the patch
|
|
|
|
# https://github.com/andmarti1424/sc-im/pull/542
|
|
|
|
(fetchpatch {
|
|
|
|
name = "use-pkg-config-for-libxls-and-libxlsxwriter.patch";
|
|
|
|
url = "https://github.com/andmarti1424/sc-im/commit/b62dc25eb808e18a8ab7ee7d8eb290e34efeb075.patch";
|
|
|
|
sha256 = "1yn32ps74ngzg3rbkqf8dn0g19jv4xhxrfgx9agnywf0x8gbwjh3";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
patchFlags = [ "-p2" ];
|
|
|
|
|
2021-03-20 12:35:55 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
which
|
2021-03-14 18:50:12 +01:00
|
|
|
bison
|
2021-03-20 12:35:55 +01:00
|
|
|
];
|
2015-03-01 14:37:28 +01:00
|
|
|
|
2021-03-20 12:35:55 +01:00
|
|
|
buildInputs = [
|
|
|
|
gnuplot
|
|
|
|
libxls
|
2021-04-22 15:49:26 +02:00
|
|
|
libxlsxwriter
|
2021-03-20 12:35:55 +01:00
|
|
|
libxml2
|
|
|
|
libzip
|
|
|
|
ncurses
|
|
|
|
];
|
2018-02-21 14:16:13 +01:00
|
|
|
|
2021-03-20 12:35:55 +01:00
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
2015-03-01 14:37:28 +01:00
|
|
|
|
2021-03-20 12:35:55 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram "$out/bin/sc-im" --prefix PATH : "${lib.makeBinPath [ gnuplot ]}"
|
2015-03-01 14:37:28 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/andmarti1424/sc-im";
|
2021-03-20 12:35:55 +01:00
|
|
|
description = "An ncurses spreadsheet program for terminal";
|
2016-02-07 14:42:22 +01:00
|
|
|
license = licenses.bsdOriginal;
|
2021-03-20 12:35:55 +01:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2018-05-23 17:49:02 +02:00
|
|
|
platforms = platforms.unix;
|
2015-03-01 14:37:28 +01:00
|
|
|
};
|
|
|
|
}
|