summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-06-28 18:03:41 +0200
committerGitHub <noreply@github.com>2018-06-28 18:03:41 +0200
commitc2eb9b4bde0928153600bfc3c1d0fd32a5df5012 (patch)
tree239ea90c9464ba74ef1af97eb48073f5ee411407 /pkgs
parente686bd277196f33fccb685c4526333ebc50d1768 (diff)
parentb6411d5e58d3f449179dca415b8a01012a73f724 (diff)
downloadnixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.tar
nixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.tar.gz
nixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.tar.bz2
nixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.tar.lz
nixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.tar.xz
nixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.tar.zst
nixpkgs-c2eb9b4bde0928153600bfc3c1d0fd32a5df5012.zip
Merge pull request #42668 from mnacamura/feedgnuplot
feedgnuplot: init at 1.49
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/graphics/feedgnuplot/default.nix54
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/feedgnuplot/default.nix b/pkgs/tools/graphics/feedgnuplot/default.nix
new file mode 100644
index 00000000000..4e371ffd2b0
--- /dev/null
+++ b/pkgs/tools/graphics/feedgnuplot/default.nix
@@ -0,0 +1,54 @@
+{ 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 .
+  '';
+
+  # 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
+  '';
+
+  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 38ad07f2e69..b05ab492605 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2431,6 +2431,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 { };