mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 07:32:58 +00:00
gnuplot: Reduce dependency bloat a bit
This commit is contained in:
parent
a1a96d8744
commit
6c5186cf9b
@ -1,25 +1,24 @@
|
||||
{ stdenv, fetchurl, zlib, gd, texinfo, makeWrapper, readline
|
||||
, texLive ? null
|
||||
, lua ? null
|
||||
{ lib, stdenv, fetchurl, zlib, gd, texinfo4, makeWrapper, readline
|
||||
, withTeXLive ? false, texLive
|
||||
, withLua ? false, lua
|
||||
, emacs ? null
|
||||
, libX11 ? null
|
||||
, libXt ? null
|
||||
, libXpm ? null
|
||||
, libXaw ? null
|
||||
, aquaterm ? false
|
||||
, wxGTK ? null
|
||||
, withWxGTK ? false, wxGTK ? null
|
||||
, pango ? null
|
||||
, cairo ? null
|
||||
, pkgconfig ? null
|
||||
, fontconfig ? null
|
||||
, gnused ? null
|
||||
, coreutils ? null
|
||||
, qt ? null }:
|
||||
, withQt ? false, qt4 }:
|
||||
|
||||
assert libX11 != null -> (fontconfig != null && gnused != null && coreutils != null);
|
||||
let
|
||||
withX = libX11 != null && !aquaterm;
|
||||
withQt = qt != null;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gnuplot-4.6.5";
|
||||
@ -30,20 +29,21 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ zlib gd texinfo readline emacs lua texLive
|
||||
[ zlib gd texinfo4 readline
|
||||
pango cairo pkgconfig makeWrapper ]
|
||||
++ stdenv.lib.optionals withX [ libX11 libXpm libXt libXaw ]
|
||||
++ stdenv.lib.optional withQt [ qt ]
|
||||
++ lib.optional withTeXLive texLive
|
||||
++ lib.optional withLua lua
|
||||
++ lib.optionals withX [ libX11 libXpm libXt libXaw ]
|
||||
++ lib.optional withQt [ qt4 ]
|
||||
# compiling with wxGTK causes a malloc (double free) error on darwin
|
||||
++ stdenv.lib.optional (!stdenv.isDarwin) wxGTK;
|
||||
++ lib.optional (withWxGTK && !stdenv.isDarwin) wxGTK;
|
||||
|
||||
configureFlags =
|
||||
(if withX then ["--with-x"] else ["--without-x"])
|
||||
++ (if withQt then ["--enable-qt"] else ["--disable-qt"])
|
||||
++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"])
|
||||
;
|
||||
++ (if aquaterm then ["--with-aquaterm"] else ["--without-aquaterm"]);
|
||||
|
||||
postInstall = stdenv.lib.optionalString withX ''
|
||||
postInstall = lib.optionalString withX ''
|
||||
wrapProgram $out/bin/gnuplot \
|
||||
--prefix PATH : '${gnused}/bin' \
|
||||
--prefix PATH : '${coreutils}/bin' \
|
||||
@ -51,8 +51,8 @@ stdenv.mkDerivation rec {
|
||||
--run '. ${./set-gdfontpath-from-fontconfig.sh}'
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.gnuplot.info;
|
||||
meta = with lib; {
|
||||
homepage = http://www.gnuplot.info/;
|
||||
description = "A portable command-line driven graphing utility for many platforms";
|
||||
hydraPlatforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
|
@ -1153,17 +1153,13 @@ let
|
||||
});
|
||||
|
||||
gnuplot = callPackage ../tools/graphics/gnuplot {
|
||||
texLive = null;
|
||||
lua = null;
|
||||
texinfo = texinfo4; # build errors with gnuplot-4.6.3
|
||||
|
||||
# use gccApple to compile on darwin, seems to resolve a malloc error
|
||||
stdenv = if stdenv.isDarwin
|
||||
then stdenvAdapters.overrideGCC stdenv gccApple
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
gnuplot_qt = gnuplot.override { qt = qt4; };
|
||||
gnuplot_qt = gnuplot.override { withQt = true; };
|
||||
|
||||
# must have AquaTerm installed separately
|
||||
gnuplot_aquaterm = gnuplot.override { aquaterm = true; };
|
||||
|
Loading…
Reference in New Issue
Block a user