2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, makeWrapper, gawk
|
2018-06-27 20:22:20 +01:00
|
|
|
, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2018-10-13 00:10:38 +01:00
|
|
|
perlPackages.buildPerlPackage rec {
|
2019-06-20 14:07:56 +01:00
|
|
|
pname = "feedgnuplot";
|
2018-10-01 16:38:27 +01:00
|
|
|
version = "1.51";
|
2018-06-27 20:22:20 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dkogan";
|
|
|
|
repo = "feedgnuplot";
|
|
|
|
rev = "v${version}";
|
2018-10-01 16:38:27 +01:00
|
|
|
sha256 = "0npk2l032cnmibjj5zf3ii09mpxciqn32lx6g5bal91bkxwn7r5i";
|
2018-06-27 20:22:20 +01:00
|
|
|
};
|
|
|
|
|
2018-08-19 15:34:30 +01:00
|
|
|
outputs = [ "out" ];
|
|
|
|
|
2018-06-27 20:22:20 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper gawk ];
|
|
|
|
|
|
|
|
buildInputs = [ gnuplot perl ]
|
|
|
|
++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]);
|
|
|
|
|
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = fontsConf;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2018-06-28 12:46:10 +01:00
|
|
|
# Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5.
|
|
|
|
doCheck = false;
|
2018-06-27 20:22:20 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/feedgnuplot \
|
|
|
|
--prefix "PATH" ":" "$PATH" \
|
|
|
|
--prefix "PERL5LIB" ":" "$PERL5LIB"
|
2018-06-28 04:23:55 +01:00
|
|
|
install -D -m 444 -t $out/share/bash-completion/completions \
|
|
|
|
completions/bash/feedgnuplot
|
|
|
|
install -D -m 444 -t $out/share/zsh/site-functions \
|
|
|
|
completions/zsh/_feedgnuplot
|
2018-06-27 20:22:20 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-06-27 20:22:20 +01:00
|
|
|
description = "General purpose pipe-oriented plotting tool";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/dkogan/feedgnuplot/";
|
2018-06-27 20:22:20 +01:00
|
|
|
license = with licenses; [ artistic1 gpl1Plus ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ mnacamura ];
|
|
|
|
};
|
|
|
|
}
|