From eea3344e9171c80e59e157c2c5739b8150d782dc Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 30 Jun 2021 04:19:12 +0200 Subject: [PATCH] ploticus: Modernize MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split pname & version. - Format the expression. - Do not use custom builder, the generic one is good enough. - Install the man pages to datadir instead of $out, where they would be moved anyway. – Allowing us to drop the postFixup. - Use patch instead of wrapper for pointing to prefabs. This is what Debian does and it will also apply to the pl binary, not just the ploticus alias. - Since the wrapping is no longer necessary, let’s create the alias using a symlink. --- pkgs/tools/graphics/ploticus/builder.sh | 33 ----------- pkgs/tools/graphics/ploticus/default.nix | 57 +++++++++++++++---- .../graphics/ploticus/set-prefabs-dir.patch | 10 ++++ 3 files changed, 56 insertions(+), 44 deletions(-) delete mode 100644 pkgs/tools/graphics/ploticus/builder.sh create mode 100644 pkgs/tools/graphics/ploticus/set-prefabs-dir.patch diff --git a/pkgs/tools/graphics/ploticus/builder.sh b/pkgs/tools/graphics/ploticus/builder.sh deleted file mode 100644 index 2fb16b259bdc..000000000000 --- a/pkgs/tools/graphics/ploticus/builder.sh +++ /dev/null @@ -1,33 +0,0 @@ -source $stdenv/setup - -preBuild() { - cd src -} - -preInstall() { - mkdir -p $out/bin -} - -postInstall() { - # Install the "prefabs". - mkdir -p $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 <