2021-02-05 17:12:51 +00:00
|
|
|
{ lib, fetchFromGitHub, makeWrapper, gawk
|
2020-04-24 23:36:52 +00:00
|
|
|
, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
perlPackages.buildPerlPackage rec {
|
|
|
|
pname = "feedgnuplot";
|
|
|
|
version = "1.51";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dkogan";
|
|
|
|
repo = "feedgnuplot";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0npk2l032cnmibjj5zf3ii09mpxciqn32lx6g5bal91bkxwn7r5i";
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper gawk ];
|
|
|
|
|
|
|
|
buildInputs = [ gnuplot perl ]
|
|
|
|
++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]);
|
|
|
|
|
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = fontsConf;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/feedgnuplot \
|
|
|
|
--prefix "PATH" ":" "$PATH" \
|
|
|
|
--prefix "PERL5LIB" ":" "$PERL5LIB"
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "General purpose pipe-oriented plotting tool";
|
|
|
|
homepage = "https://github.com/dkogan/feedgnuplot/";
|
|
|
|
license = with licenses; [ artistic1 gpl1Plus ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ mnacamura ];
|
|
|
|
};
|
|
|
|
}
|