diff --git a/pkgs/tools/graphics/ploticus/default.nix b/pkgs/tools/graphics/ploticus/default.nix index e5d9f7160789..6b1b50bca02b 100644 --- a/pkgs/tools/graphics/ploticus/default.nix +++ b/pkgs/tools/graphics/ploticus/default.nix @@ -6,13 +6,13 @@ , libpng }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "ploticus"; version = "2.42"; src = fetchurl { - url = "mirror://sourceforge/ploticus/ploticus/2.41/pl241src.tar.gz"; - sha256 = "1065r0nizjixi9sxxfxrnwg10r458i6fgsd23nrxa200rypvdk7c"; + url = "mirror://sourceforge/ploticus/ploticus/${version}/ploticus${lib.replaceStrings [ "." ] [ "" ] version}_src.tar.gz"; + sha256 = "PynkufQFIDqT7+yQDlgW2eG0OBghiB4kHAjKt91m4LA="; }; patches = [ @@ -46,11 +46,7 @@ stdenv.mkDerivation { mkdir -p "$out/share/ploticus/prefabs" cp -rv prefabs/* "$out/share/ploticus/prefabs" - # Install the man pages. - cp -rv man $out/share - # Add aliases for backwards compatibility. - ln -s "pl.1" "$out/share/man/man1/ploticus.1" ln -s "pl" "$out/bin/ploticus" ''; diff --git a/pkgs/tools/graphics/ploticus/set-prefabs-dir.patch b/pkgs/tools/graphics/ploticus/set-prefabs-dir.patch index 3955d34972e5..82871654fdea 100644 --- a/pkgs/tools/graphics/ploticus/set-prefabs-dir.patch +++ b/pkgs/tools/graphics/ploticus/set-prefabs-dir.patch @@ -1,10 +1,11 @@ ---- a/src/Makefile -+++ b/src/Makefile -@@ -133,6 +133,6 @@ - #### To set a hard-coded directory for prefabs files, uncomment & edit the following.. - #### If done, users won't be required to have PLOTICUS_PREFABS environment variable defined. - #### This option not available for win32 --# PREFABS_DIR = "/usr/lib/ploticus/prefabs" -+PREFABS_DIR = "$(out)/share/ploticus/prefabs" +--- a/src/pl.h ++++ b/src/pl.h +@@ -8,7 +8,7 @@ + #include + #include "plg.h" +-#define PREFABS_DIR "" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */ ++#define PREFABS_DIR "@out@/share/ploticus/prefabs" /* INSTALLERS can set this to a valid pathname, so that users don't need to set PLOTICUS_PREFABS env var */ + + #define PLVERSION "2.42-May2013" /* see also the Copyright page, and page headers and footers */