about summary refs log tree commit diff
path: root/pkgs/tools/graphics/ploticus
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-03-26 23:42:29 +0000
committerLudovic Courtès <ludo@gnu.org>2008-03-26 23:42:29 +0000
commit25ea32dc112e49ad35fa9f626747c5a9cc1a482b (patch)
tree7b23cdf448bb99e6f4db6f896aeb0f3f630ad6a9 /pkgs/tools/graphics/ploticus
parent7cc6405859b00d74884340872e4a8e487ae6e0b6 (diff)
downloadnixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.tar
nixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.tar.gz
nixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.tar.bz2
nixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.tar.lz
nixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.tar.xz
nixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.tar.zst
nixlib-25ea32dc112e49ad35fa9f626747c5a9cc1a482b.zip
Ploticus: Install prefabs and wrapper script.
svn path=/nixpkgs/trunk/; revision=11295
Diffstat (limited to 'pkgs/tools/graphics/ploticus')
-rw-r--r--pkgs/tools/graphics/ploticus/builder.sh25
-rw-r--r--pkgs/tools/graphics/ploticus/default.nix2
2 files changed, 26 insertions, 1 deletions
diff --git a/pkgs/tools/graphics/ploticus/builder.sh b/pkgs/tools/graphics/ploticus/builder.sh
index c6f2d7899ba8..11ff6f5a332b 100644
--- a/pkgs/tools/graphics/ploticus/builder.sh
+++ b/pkgs/tools/graphics/ploticus/builder.sh
@@ -12,4 +12,29 @@ preInstall() {
 
 preInstall=preInstall
 
+postInstall() {
+  # Install the "prefabs".
+  ensureDir $out/share/ploticus/prefabs &&		\
+  cd .. &&						\
+  cp -rv prefabs/* $out/share/ploticus/prefabs
+
+  # Create a wrapper that knows where to find them.  Debian's package
+  # does something similar by patching directly the C file that looks
+  # for `$PLOTICUS_PREFABS'.
+  cat > $out/bin/ploticus <<EOF
+#! $SHELL -e
+PLOTICUS_PREFABS="$out/share/ploticus/prefabs"
+export PLOTICUS_PREFABS
+exec "$out/bin/pl" \$@
+EOF
+  chmod +x $out/bin/ploticus
+
+  # Install the man pages.
+  cp -rv man $out
+  ln -s "$out/man/man1/pl.1" "$out/man/man1/ploticus.1"
+}
+
+postInstall=postInstall
+
+
 genericBuild
diff --git a/pkgs/tools/graphics/ploticus/default.nix b/pkgs/tools/graphics/ploticus/default.nix
index 5edba3df0688..3efb7eab881e 100644
--- a/pkgs/tools/graphics/ploticus/default.nix
+++ b/pkgs/tools/graphics/ploticus/default.nix
@@ -24,7 +24,7 @@ stdenv.mkDerivation {
       statistical capabilities.  It allows significant user control
       over colors, styles, options and details.'';
 
-    license = "GPL";
+    license = "GPLv2+";
     homepage = http://ploticus.sourceforge.net/;
   };
 }