From 16a1b346d4ef285cffe712e898de18b4948c5ece Mon Sep 17 00:00:00 2001 From: ckie Date: Wed, 9 Feb 2022 12:57:11 +0200 Subject: [PATCH] vtk: create versionless symlinks in /lib A little quality-of-life change for consumers of this library. Depending on the upstream version in dependant derivations is inconveninent. --- pkgs/development/libraries/vtk/generic.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index c180b05e9521..69e360901779 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -90,6 +90,12 @@ in stdenv.mkDerivation rec { sed -i 's/fprintf(output, shift)/fprintf(output, "%s", shift)/g' ./ThirdParty/libxml2/vtklibxml2/xpath.c ''; + preFixup = '' + for lib in $out/lib/libvtk*.so; do + ln -s $lib $out/lib/"$(basename "$lib" | sed -e 's/-[[:digit:]]*.[[:digit:]]*//g')" + done + ''; + meta = with lib; { description = "Open source libraries for 3D computer graphics, image processing and visualization"; homepage = "https://www.vtk.org/";