From 62620340363674a053ef5db77d391575abf9d162 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 28 Jun 2018 04:22:20 +0900 Subject: [PATCH 1/3] feedgnuplot: init at 1.49 --- pkgs/tools/graphics/feedgnuplot/default.nix | 50 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/tools/graphics/feedgnuplot/default.nix diff --git a/pkgs/tools/graphics/feedgnuplot/default.nix b/pkgs/tools/graphics/feedgnuplot/default.nix new file mode 100644 index 000000000000..58b1e7a9dc93 --- /dev/null +++ b/pkgs/tools/graphics/feedgnuplot/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchFromGitHub, buildPerlPackage, makeWrapper, gawk +, makeFontsConf, freefont_ttf, gnuplot, perl, perlPackages +}: + +let + + fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf ]; }; + +in + +buildPerlPackage rec { + name = "feedgnuplot-${version}"; + version = "1.49"; + + src = fetchFromGitHub { + owner = "dkogan"; + repo = "feedgnuplot"; + rev = "v${version}"; + sha256 = "1bjnx36rsxlj845w9apvdjpza8vd9rbs3dlmgvky6yznrwa6sm02"; + }; + + nativeBuildInputs = [ makeWrapper gawk ]; + + buildInputs = [ gnuplot perl ] + ++ (with perlPackages; [ ListMoreUtils IPCRun StringShellQuote ]); + + # Fontconfig error: Cannot load default config file + FONTCONFIG_FILE = fontsConf; + + postPatch = '' + patchShebangs . + ''; + + doCheck = true; + + postInstall = '' + wrapProgram $out/bin/feedgnuplot \ + --prefix "PATH" ":" "$PATH" \ + --prefix "PERL5LIB" ":" "$PERL5LIB" + ''; + + + meta = with stdenv.lib; { + 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 507f3ee5d845..a8968df66875 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2429,6 +2429,8 @@ with pkgs; fdk_aac = callPackage ../development/libraries/fdk-aac { }; + feedgnuplot = callPackage ../tools/graphics/feedgnuplot { }; + fim = callPackage ../tools/graphics/fim { }; flac123 = callPackage ../applications/audio/flac123 { }; From c315d355bec46edb316c384f461867e9a784d2e2 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 28 Jun 2018 12:23:55 +0900 Subject: [PATCH 2/3] feedgnuplot: install shell completions --- pkgs/tools/graphics/feedgnuplot/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/feedgnuplot/default.nix b/pkgs/tools/graphics/feedgnuplot/default.nix index 58b1e7a9dc93..f998a288287d 100644 --- a/pkgs/tools/graphics/feedgnuplot/default.nix +++ b/pkgs/tools/graphics/feedgnuplot/default.nix @@ -37,9 +37,12 @@ buildPerlPackage rec { 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 ''; - meta = with stdenv.lib; { description = "General purpose pipe-oriented plotting tool"; homepage = https://github.com/dkogan/feedgnuplot/; From b6411d5e58d3f449179dca415b8a01012a73f724 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 28 Jun 2018 20:46:10 +0900 Subject: [PATCH 3/3] feedgnuplot: disable tests --- pkgs/tools/graphics/feedgnuplot/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/graphics/feedgnuplot/default.nix b/pkgs/tools/graphics/feedgnuplot/default.nix index f998a288287d..4e371ffd2b07 100644 --- a/pkgs/tools/graphics/feedgnuplot/default.nix +++ b/pkgs/tools/graphics/feedgnuplot/default.nix @@ -31,7 +31,8 @@ buildPerlPackage rec { patchShebangs . ''; - doCheck = true; + # Tests require gnuplot 4.6.4 and are completely skipped with gnuplot 5. + doCheck = false; postInstall = '' wrapProgram $out/bin/feedgnuplot \