Merge pull request #124749 from mnacamura/feedgnuplot

feedgnuplot: fix perl shebang and bump version
This commit is contained in:
Dmitry Kalinkin 2021-05-28 18:25:05 -04:00 committed by GitHub
commit 881ebaacf8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
{ lib, fetchFromGitHub, makeWrapper, gawk
, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages
, stdenv, shortenPerlShebang
}:
let
@ -10,18 +11,18 @@ in
perlPackages.buildPerlPackage rec {
pname = "feedgnuplot";
version = "1.51";
version = "1.58";
src = fetchFromGitHub {
owner = "dkogan";
repo = "feedgnuplot";
rev = "v${version}";
sha256 = "0npk2l032cnmibjj5zf3ii09mpxciqn32lx6g5bal91bkxwn7r5i";
sha256 = "1qix4lwwyhqibz0a6q2rrb497rmk00v1fvmdyinj0dqmgjw155zr";
};
outputs = [ "out" ];
nativeBuildInputs = [ makeWrapper gawk ];
nativeBuildInputs = [ makeWrapper gawk ] ++ lib.optional stdenv.isDarwin shortenPerlShebang;
buildInputs = [ gnuplot perl ]
++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]);
@ -36,7 +37,9 @@ perlPackages.buildPerlPackage rec {
# Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5.
doCheck = false;
postInstall = ''
postInstall = lib.optionalString stdenv.isDarwin ''
shortenPerlShebang $out/bin/feedgnuplot
'' + ''
wrapProgram $out/bin/feedgnuplot \
--prefix "PATH" ":" "$PATH" \
--prefix "PERL5LIB" ":" "$PERL5LIB"