1{
2 lib,
3 stdenv,
4 fetchurl,
5 gnuplot,
6 ruby,
7}:
8
9stdenv.mkDerivation {
10 pname = "eplot";
11 version = "2.09";
12
13 # Upstream has been contacted (2015-03) regarding providing versioned
14 # download URLs. Initial response was positive, but no action yet.
15 src = fetchurl {
16 url = "http://liris.cnrs.fr/christian.wolf/software/eplot/download/eplot";
17 sha256 = "0y9x82i3sfpgxsqz2w42r6iad6ph7vxb7np1xbwapx5iipciclw5";
18 };
19
20 ecSrc = fetchurl {
21 url = "http://liris.cnrs.fr/christian.wolf/software/eplot/download/ec";
22 sha256 = "0fg31g8mrcx14h2rjcf091cbd924n19z55iscaiflspifya30yhd";
23 };
24
25 buildInputs = [ ruby ];
26
27 dontUnpack = true;
28
29 installPhase = ''
30 runHook preInstall
31
32 mkdir -p "$out/bin"
33 cp "$src" "$out/bin/eplot"
34 cp "$ecSrc" "$out/bin/ec"
35 chmod +x "$out/bin/"*
36
37 sed -i -e "s|gnuplot -persist|${gnuplot}/bin/gnuplot -persist|" "$out/bin/eplot"
38
39 runHook postInstall
40 '';
41
42 meta = with lib; {
43 description = "Create plots quickly with gnuplot";
44 longDescription = ''
45 eplot ("easy gnuplot") is a ruby script which allows to pipe data easily
46 through gnuplot and create plots quickly, which can be saved in
47 postscript, PDF, PNG or EMF files. Plotting of multiple files into a
48 single diagram is supported.
49
50 This package also includes the complementary 'ec' tool (say "extract
51 column").
52 '';
53 homepage = "https://perso.liris.cnrs.fr/christian.wolf/software/eplot/";
54 license = licenses.gpl2Plus;
55 platforms = platforms.all;
56 maintainers = with maintainers; [
57 bjornfor
58 shamilton
59 ];
60 };
61}