2022-11-10 08:45:11 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, makeFontsConf
|
|
|
|
, freefont_ttf
|
|
|
|
, gnuplot
|
|
|
|
, perl
|
|
|
|
, perlPackages
|
|
|
|
, stdenv
|
|
|
|
, shortenPerlShebang
|
|
|
|
, installShellFiles
|
2018-06-27 19:22:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2018-10-12 23:10:38 +00:00
|
|
|
perlPackages.buildPerlPackage rec {
|
2019-06-20 13:07:56 +00:00
|
|
|
pname = "feedgnuplot";
|
2022-11-10 08:45:11 +00:00
|
|
|
version = "1.61";
|
2018-06-27 19:22:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dkogan";
|
|
|
|
repo = "feedgnuplot";
|
|
|
|
rev = "v${version}";
|
2022-11-10 08:45:11 +00:00
|
|
|
sha256 = "sha256-r5rszxr65lSozkUNaqfBn4I4XjLtvQ6T/BG366JXLRM=";
|
2018-06-27 19:22:20 +00:00
|
|
|
};
|
|
|
|
|
2018-08-19 14:34:30 +00:00
|
|
|
outputs = [ "out" ];
|
|
|
|
|
2022-11-10 08:45:11 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper installShellFiles ] ++ lib.optional stdenv.isDarwin shortenPerlShebang;
|
2018-06-27 19:22:20 +00:00
|
|
|
|
|
|
|
buildInputs = [ gnuplot perl ]
|
|
|
|
++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]);
|
|
|
|
|
|
|
|
# Fontconfig error: Cannot load default config file
|
|
|
|
FONTCONFIG_FILE = fontsConf;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
2018-06-28 11:46:10 +00:00
|
|
|
# Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5.
|
|
|
|
doCheck = false;
|
2018-06-27 19:22:20 +00:00
|
|
|
|
2021-05-28 11:51:08 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
|
|
shortenPerlShebang $out/bin/feedgnuplot
|
|
|
|
'' + ''
|
2018-06-27 19:22:20 +00:00
|
|
|
wrapProgram $out/bin/feedgnuplot \
|
|
|
|
--prefix "PATH" ":" "$PATH" \
|
|
|
|
--prefix "PERL5LIB" ":" "$PERL5LIB"
|
2022-11-10 08:45:11 +00:00
|
|
|
|
|
|
|
installShellCompletion --bash --name feedgnuplot.bash completions/bash/feedgnuplot
|
|
|
|
installShellCompletion --zsh completions/zsh/_feedgnuplot
|
2018-06-27 19:22:20 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-06-27 19:22:20 +00:00
|
|
|
description = "General purpose pipe-oriented plotting tool";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/dkogan/feedgnuplot/";
|
2018-06-27 19:22:20 +00:00
|
|
|
license = with licenses; [ artistic1 gpl1Plus ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ mnacamura ];
|
|
|
|
};
|
|
|
|
}
|