3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/graphics/feedgnuplot/default.nix

60 lines
1.6 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, makeWrapper, gawk
2018-06-27 20:22:20 +01:00
, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages
2021-05-28 12:51:08 +01:00
, stdenv, shortenPerlShebang
2018-06-27 20:22:20 +01:00
}:
let
fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; };
in
perlPackages.buildPerlPackage rec {
pname = "feedgnuplot";
2021-05-28 12:51:52 +01:00
version = "1.58";
2018-06-27 20:22:20 +01:00
src = fetchFromGitHub {
owner = "dkogan";
repo = "feedgnuplot";
rev = "v${version}";
2021-05-28 12:51:52 +01:00
sha256 = "1qix4lwwyhqibz0a6q2rrb497rmk00v1fvmdyinj0dqmgjw155zr";
2018-06-27 20:22:20 +01:00
};
outputs = [ "out" ];
2021-05-28 12:51:08 +01:00
nativeBuildInputs = [ makeWrapper gawk ] ++ lib.optional stdenv.isDarwin shortenPerlShebang;
2018-06-27 20:22:20 +01:00
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
2021-05-28 12:51:08 +01:00
postInstall = lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/feedgnuplot
'' + ''
2018-06-27 20:22:20 +01:00
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
'';
meta = with lib; {
2018-06-27 20:22:20 +01:00
description = "General purpose pipe-oriented plotting tool";
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 ];
};
}