mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 01:03:25 +00:00
b0a6ea2442
libxls has several security issues that haven't been addresses in months. Since it is an optional dependency of sc-im, this makes it optional in Nix as well and disabling it by default.
62 lines
1.1 KiB
Nix
62 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, pkg-config
|
|
, which
|
|
, bison
|
|
, gnuplot
|
|
, libxls
|
|
, libxlsxwriter
|
|
, libxml2
|
|
, libzip
|
|
, ncurses
|
|
, xlsSupport ? false
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "sc-im";
|
|
version = "0.8.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "andmarti1424";
|
|
repo = "sc-im";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-QlnxMe0WsRX9J2xzpf2Udcf9+N3MvQWqmYl2YKsGpYM=";
|
|
};
|
|
|
|
sourceRoot = "${src.name}/src";
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
pkg-config
|
|
which
|
|
bison
|
|
];
|
|
|
|
buildInputs = [
|
|
gnuplot
|
|
libxml2
|
|
libzip
|
|
ncurses
|
|
] ++ lib.optionals xlsSupport [
|
|
libxls
|
|
libxlsxwriter
|
|
];
|
|
|
|
makeFlags = [ "prefix=${placeholder "out"}" ];
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/sc-im" --prefix PATH : "${lib.makeBinPath [ gnuplot ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
changelog = "https://github.com/andmarti1424/sc-im/blob/${src.rev}/CHANGES";
|
|
homepage = "https://github.com/andmarti1424/sc-im";
|
|
description = "An ncurses spreadsheet program for terminal";
|
|
license = licenses.bsdOriginal;
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|